Skip to content

Instantly share code, notes, and snippets.

@thealmikey
Last active April 5, 2019 17:27
Show Gist options
  • Save thealmikey/e673a41167b4ada494b92115fe5b813d to your computer and use it in GitHub Desktop.
Save thealmikey/e673a41167b4ada494b92115fe5b813d to your computer and use it in GitHub Desktop.
fun main() {
val context = ZMQ.context(1)
val socket = context.socket(ZMQ.REP)
println("Starting the server...")
socket.bind("tcp://*:5897")
while (true) {
val rawRequest = socket.recv(0)
val cleanRequest = String(rawRequest, 0, rawRequest.size - 1)
println("Request received : $cleanRequest")
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment