Skip to content

Instantly share code, notes, and snippets.

@taksatou
Created Apr 18, 2014
Embed
What would you like to do?
(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