/* Create a ZMQ_SUB socket */ void *socket = zmq_socket (context, ZMQ_SUB); assert (socket); /* Connect it to an in-process transport with the endpoint 'my_publisher' */ int rc = zmq_connect (socket, "inproc://my_publisher"); assert (rc == 0); /* Connect it to the host server001, port 5555 using a TCP transport */ rc = zmq_connect (socket, "tcp://server001:5555"); assert (rc == 0);