Next: Examples, Previous: Installing and loading, Up: Introduction [Contents][Index]
The usage is very close to the ZeroMQ library C language bindings for the socket creation and manipulation with the exception of creating a zeromq context, which is automatically done in the bindings internals.
For example, a basic client that does a request / reply from a server on port local port 5555 (available as zmq_example1.m):
%% Create socket and connect to server requester = zmq_socket (ZMQ_REQ); zmq_connect (requester, "tcp://localhost:5555"); %% send some data zmq_send (requester, uint8("Hello"), 5, 0); %% try to read up to 10 bytes of reply data. received = zmq_recv (requester, 10, 0); zmq_close (requester);
An overview of the package can be displayed by running help zeromq
Help for each function can be displayed by help thefunctionname
ie:
help iszmq