Created
April 11, 2019 18:46
-
-
Save thealmikey/8904970392b0745051d1b78bd69e012f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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