Skip to content

Instantly share code, notes, and snippets.

@thealmikey
Created April 11, 2019 18:46
Show Gist options
  • Save thealmikey/8904970392b0745051d1b78bd69e012f to your computer and use it in GitHub Desktop.
Save thealmikey/8904970392b0745051d1b78bd69e012f to your computer and use it in GitHub Desktop.
part2
import org.zeromq.ZMQ
fun main() {
val context = ZMQ.context(1)
val socket = context.socket(ZMQ.PULL)
println("Starting the puller...")
socket.bind("tcp://localhost:5897")
while (true) {
val rawRequest = socket.recv()
val cleanRequest = String(rawRequest, 0, rawRequest.size - 1)
println("pulled some data : $cleanRequest")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment