Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <stdbool.h>
- #include <string.h>
- #include <czmq.h>
- #include <assert.h>
- int main ()
- {
- zctx_t *zctx = zctx_new();
- zctx_set_linger(zctx, 1000);
- void *zsocket = zsocket_new (zctx, ZMQ_PUB);
- assert(zsocket);
- zsockopt_set_recovery_ivl (zsocket, 1);
- zsocket_bind (zsocket, "epgm://239.77.77.77:5556");
- zstr_send (zsocket,"MESSAGE: HI");
- zsocket_destroy(zctx, zsocket);
- zctx_destroy(&zctx);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment