Commit e16e50f0 authored by Christian Fibich's avatar Christian Fibich
Browse files

Update README.md

parent 2fb6c1c5
......@@ -74,26 +74,25 @@ conventional C strings via ZeroMQ
[TIP]
============
Multi-part messages can be *sent* by supplying the `ZMQ_SNDMORE` to
the link:http://api.zeromq.org/4-0:zmq-send[`zmq_send(3)`] and link:http://api.zeromq.org/4-0:zmq-msg-send[`zmq_msg_send(3)`] functions in all but the last
the [`zmq_send(3)`](http://api.zeromq.org/4-0:zmq-send) and [`zmq_msg_send(3)`](http://api.zeromq.org/4-0:zmq-msg-send) functions in all but the last
message parts.
Multi-part messages can be *received* using link:http://api.zeromq.org/4-0:zmq-recv[`zmq_recv(3)`] and link:http://api.zeromq.org/4-0:zmq-msg-recv[`zmq_msg_recv(3)`].
Multi-part messages can be *received* using [`zmq_recv(3)`](http://api.zeromq.org/4-0:zmq-recv) and [`zmq_msg_recv(3)`](http://api.zeromq.org/4-0:zmq-msg-recv).
just like single-part messages. After receiving the current part of the
message, use
* link:http://api.zeromq.org/4-0:zmq-msg-more[`zmq_msg_more(3)`] on the message object if using link:http://api.zeromq.org/4-0:zmq-msg-recv[`zmq_msg_recv(3)`] or
* or link:http://api.zeromq.org/4-0:zmq-getsockopt[`zmq_getsockopt(3)`] on the socket with the `ZMQ_RCVMORE` option name if using link:http://api.zeromq.org/4-0:zmq-recv[`zmq_recv(3)`].
* [`zmq_msg_more(3)`](http://api.zeromq.org/4-0:zmq-msg-more) on the message object if using link:http://api.zeromq.org/4-0:zmq-msg-recv[`zmq_msg_recv(3)`] or
* or [`zmq_getsockopt(3)`](http://api.zeromq.org/4-0:zmq-getsockopt) on the socket with the `ZMQ_RCVMORE` option name if using [`zmq_recv(3)`](http://api.zeromq.org/4-0:zmq-recv).
============
[NOTE]
============
You can read/write to a ZeroMQ socket directly from a buffer (e.g., an array) via
link:http://api.zeromq.org/4-0:zmq-recv[`zmq_recv(3)`]/link:http://api.zeromq.org/4-0:zmq-send[`zmq_send(3)`] or via ZeroMQ message objects using link:http://api.zeromq.org/4-0:zmq-msg-recv[`zmq_msg_recv(3)`]/link:http://api.zeromq.org/4-0:zmq-msg-send[`zmq_msg_send(3)`].
[`zmq_recv(3)`](http://api.zeromq.org/4-0:zmq-recv)/[`zmq_send(3)`](http://api.zeromq.org/4-0:zmq-send) or via ZeroMQ message objects using [`zmq_msg_recv(3)`](http://api.zeromq.org/4-0:zmq-msg-recv)/[`zmq_msg_send(3)`](http://api.zeromq.org/4-0:zmq-msg-send)
ZeroMQ messages provide an advantage for the receiver side: ZeroMQ allocates
as much memory as is needed to store the message dynamically.
A ZeroMQ message is just a variable of type `zmq_msg_t`. When messages are
no longer needed, they have to be freed using link:http://api.zeromq.org/4-0:zmq-msg-close[`zmq_msg_close(3)`].
no longer needed, they have to be freed using [`zmq_msg_close(3)`](http://api.zeromq.org/4-0:zmq-msg-close).
============
The _Poster_ client shall provide the following command-line interface:
......@@ -112,7 +111,7 @@ command-line arguments.
[TIP]
============
Subscribing to a particular prefix is done by calling link:http://api.zeromq.org/4-0:zmq-setsockopt[`zmq_setsockopt(3)`]
Subscribing to a particular prefix is done by calling [`zmq_setsockopt(3)`](http://api.zeromq.org/4-0:zmq-setsockopt)
on the socket with `ZMQ_SUBSCRIBE` as _option name_ and the prefix data
(in this case, the channel name) as _option value_.
============
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment