Created
April 18, 2014 16:17
-
-
Save taksatou/11052243 to your computer and use it in GitHub Desktop.
This file contains 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
(defun server () | |
(zmq:with-context (ctx) | |
(zmq:with-socket (socket ctx :rep) | |
(zmq:bind socket "tcp://127.0.0.1:5555") | |
(loop | |
(let ((query (make-instance 'zmq:msg))) | |
(zmq:recv socket query) | |
(let ((req-string (zmq:msg-data-as-string query))) | |
(format t "Recieved message: '~A'~%" req-string) | |
(zmq:send socket (make-instance 'zmq:msg :data req-string)) )))))) | |
(server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment