Created
March 7, 2014 15:28
-
-
Save edmt/9413522 to your computer and use it in GitHub Desktop.
Revisions
-
edmt created this gist
Mar 7, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ #include <zmq.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <assert.h> int main (void) { void *context = zmq_ctx_new(); void *responder = zmq_socket(context, ZMQ_REP); int rc = zmq_bind(responder, "tcp://*:5555"); assert (rc == 0); while (1) { char buffer [10]; zmq_recv(responder, buffer, 10, 0); printf ("Received Hello\n"); zmq_send(responder, "World", 5, 0); } return 0; }