Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <assert.h>
- #include <stdio.h>
- #include "zmq.h"
- int main (int argc, char const *argv[])
- {
- void *ctx, *s;
- int rc;
- ctx = zmq_ctx_new();
- assert (ctx != NULL);
- s = zmq_socket(ctx, ZMQ_PUB);
- assert (s != NULL);
- zmq_msg_t msg;
- rc = zmq_msg_init_size(&msg, 2149631138);
- if (rc < 0) {
- printf("msg_init failed: %s\n", zmq_strerror(zmq_errno()));
- return 1;
- }
- rc = zmq_msg_send(&msg, s, 0);
- if (rc < 0) {
- printf("send failed: %s\n", zmq_strerror(zmq_errno()));
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement