summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am22
-rw-r--r--doc/asciidoc.conf18
-rw-r--r--doc/xs.txt187
-rw-r--r--doc/xs_bind.txt (renamed from doc/zmq_bind.txt)46
-rw-r--r--doc/xs_close.txt52
-rw-r--r--doc/xs_connect.txt (renamed from doc/zmq_connect.txt)50
l---------doc/xs_epgm.txt (renamed from doc/zmq_epgm.txt)0
-rw-r--r--doc/xs_errno.txt50
-rw-r--r--doc/xs_getmsgopt.txt (renamed from doc/zmq_getmsgopt.txt)44
-rw-r--r--doc/xs_getsockopt.txt (renamed from doc/zmq_getsockopt.txt)198
-rw-r--r--doc/xs_init.txt (renamed from doc/zmq_init.txt)24
-rw-r--r--doc/xs_inproc.txt (renamed from doc/zmq_inproc.txt)48
-rw-r--r--doc/xs_ipc.txt (renamed from doc/zmq_ipc.txt)34
-rw-r--r--doc/xs_msg_close.txt55
-rw-r--r--doc/xs_msg_copy.txt57
-rw-r--r--doc/xs_msg_data.txt48
-rw-r--r--doc/xs_msg_init.txt65
-rw-r--r--doc/xs_msg_init_data.txt85
-rw-r--r--doc/xs_msg_init_size.txt58
-rw-r--r--doc/xs_msg_move.txt52
-rw-r--r--doc/xs_msg_size.txt48
-rw-r--r--doc/xs_pgm.txt (renamed from doc/zmq_pgm.txt)62
-rw-r--r--doc/xs_poll.txt129
-rw-r--r--doc/xs_recv.txt (renamed from doc/zmq_recv.txt)50
-rw-r--r--doc/xs_recvmsg.txt (renamed from doc/zmq_recvmsg.txt)70
-rw-r--r--doc/xs_send.txt (renamed from doc/zmq_send.txt)56
-rw-r--r--doc/xs_sendmsg.txt (renamed from doc/zmq_sendmsg.txt)68
-rw-r--r--doc/xs_setsockopt.txt (renamed from doc/zmq_setsockopt.txt)201
-rw-r--r--doc/xs_socket.txt (renamed from doc/zmq_socket.txt)248
-rw-r--r--doc/xs_strerror.txt55
-rw-r--r--doc/xs_tcp.txt (renamed from doc/zmq_tcp.txt)44
-rw-r--r--doc/xs_term.txt65
-rw-r--r--doc/xs_version.txt53
-rw-r--r--doc/zmq.txt217
-rw-r--r--doc/zmq_close.txt52
-rw-r--r--doc/zmq_errno.txt50
-rw-r--r--doc/zmq_msg_close.txt55
-rw-r--r--doc/zmq_msg_copy.txt57
-rw-r--r--doc/zmq_msg_data.txt48
-rw-r--r--doc/zmq_msg_init.txt65
-rw-r--r--doc/zmq_msg_init_data.txt85
-rw-r--r--doc/zmq_msg_init_size.txt58
-rw-r--r--doc/zmq_msg_move.txt52
-rw-r--r--doc/zmq_msg_size.txt48
-rw-r--r--doc/zmq_poll.txt129
-rw-r--r--doc/zmq_strerror.txt55
-rw-r--r--doc/zmq_term.txt65
-rw-r--r--doc/zmq_version.txt53
48 files changed, 1696 insertions, 1735 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 103652f..af8d8f4 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,10 +1,10 @@
-MAN3 = zmq_bind.3 zmq_close.3 zmq_connect.3 zmq_init.3 \
- zmq_msg_close.3 zmq_msg_copy.3 zmq_msg_data.3 zmq_msg_init.3 \
- zmq_msg_init_data.3 zmq_msg_init_size.3 zmq_msg_move.3 zmq_msg_size.3 \
- zmq_poll.3 zmq_recv.3 zmq_send.3 zmq_setsockopt.3 zmq_socket.3 \
- zmq_strerror.3 zmq_term.3 zmq_version.3 zmq_getsockopt.3 zmq_errno.3 \
- zmq_sendmsg.3 zmq_recvmsg.3 zmq_getmsgopt.3
-MAN7 = zmq.7 zmq_tcp.7 zmq_pgm.7 zmq_epgm.7 zmq_inproc.7 zmq_ipc.7
+MAN3 = xs_bind.3 xs_close.3 xs_connect.3 xs_init.3 \
+ xs_msg_close.3 xs_msg_copy.3 xs_msg_data.3 xs_msg_init.3 \
+ xs_msg_init_data.3 xs_msg_init_size.3 xs_msg_move.3 xs_msg_size.3 \
+ xs_poll.3 xs_recv.3 xs_send.3 xs_setsockopt.3 xs_socket.3 \
+ xs_strerror.3 xs_term.3 xs_version.3 xs_getsockopt.3 xs_errno.3 \
+ xs_sendmsg.3 xs_recvmsg.3 xs_getmsgopt.3
+MAN7 = xs.7 xs_tcp.7 xs_pgm.7 xs_epgm.7 xs_inproc.7 xs_ipc.7
MAN_DOC = $(MAN1) $(MAN3) $(MAN7)
@@ -30,16 +30,16 @@ SUFFIXES=.html .txt .xml .3 .7
.txt.html:
asciidoc -d manpage -b xhtml11 -f $(srcdir)/asciidoc.conf \
- -azmq_version=@PACKAGE_VERSION@ -o$@ $<
+ -axs_version=@PACKAGE_VERSION@ -o$@ $<
.txt.xml:
asciidoc -d manpage -b docbook -f $(srcdir)/asciidoc.conf \
- -azmq_version=@PACKAGE_VERSION@ -o$@ $<
+ -axs_version=@PACKAGE_VERSION@ -o$@ $<
.xml.1:
xmlto man $<
.xml.3:
xmlto man $<
.xml.7:
xmlto man $<
-zmq_epgm.7: zmq_pgm.7
- cp zmq_pgm.7 $@
+xs_epgm.7: xs_pgm.7
+ cp xs_pgm.7 $@
endif
diff --git a/doc/asciidoc.conf b/doc/asciidoc.conf
index d73d711..94cde95 100644
--- a/doc/asciidoc.conf
+++ b/doc/asciidoc.conf
@@ -2,10 +2,10 @@
literal-style=template="literalparagraph"
[macros]
-(?su)[\\]?(?P<name>linkzmq):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
+(?su)[\\]?(?P<name>linkxs):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
ifdef::backend-docbook[]
-[linkzmq-inlinemacro]
+[linkxs-inlinemacro]
{0%{target}}
{0#<citerefentry>}
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
@@ -13,7 +13,7 @@ ifdef::backend-docbook[]
endif::backend-docbook[]
ifdef::backend-xhtml11[]
-[linkzmq-inlinemacro]
+[linkxs-inlinemacro]
<a href="{target}.html">{target}{0?({0})}</a>
endif::backend-xhtml11[]
@@ -25,9 +25,9 @@ template::[header-declarations]
<refmeta>
<refentrytitle>{mantitle}</refentrytitle>
<manvolnum>{manvolnum}</manvolnum>
-<refmiscinfo class="source">0MQ</refmiscinfo>
-<refmiscinfo class="version">{zmq_version}</refmiscinfo>
-<refmiscinfo class="manual">0MQ Manual</refmiscinfo>
+<refmiscinfo class="source">Crossroads</refmiscinfo>
+<refmiscinfo class="version">{xs_version}</refmiscinfo>
+<refmiscinfo class="manual">Crossroads Manual</refmiscinfo>
</refmeta>
<refnamediv>
<refname>{manname}</refname>
@@ -42,7 +42,7 @@ ifdef::backend-xhtml11[]
{disable-javascript%<div id="footnotes"><hr /></div>}
<div id="footer">
<div id="footer-text">
-ØMQ {zmq_version}<br />
+Crossroads {xs_version}<br />
Last updated {docdate} {doctime}
</div>
</div>
@@ -50,7 +50,3 @@ Last updated {docdate} {doctime}
</html>
endif::backend-xhtml11[]
-[replacements]
-ifdef::backend-xhtml11[]
-0MQ=ØMQ
-endif::backend-xhtml11[]
diff --git a/doc/xs.txt b/doc/xs.txt
new file mode 100644
index 0000000..635c7d5
--- /dev/null
+++ b/doc/xs.txt
@@ -0,0 +1,187 @@
+xs(7)
+=====
+
+
+NAME
+----
+xs - Crossroads, a lightweight messaging layer
+
+
+SYNOPSIS
+--------
+*#include <xs.h>*
+
+*cc* ['flags'] 'files' *-lxs* ['libraries']
+
+
+DESCRIPTION
+-----------
+Crossroads is a library which extends the standard
+socket interfaces with features traditionally provided by specialised
+_messaging middleware_ products. Crossroads sockets provide an abstraction of
+asynchronous _message queues_, multiple _messaging patterns_, message
+filtering (_subscriptions_), seamless access to multiple _transport protocols_
+and more.
+
+This documentation presents an overview of Crossroads concepts, describes how
+Crossroads abstract standard sockets and provides a reference manual for the
+functions provided by the Crossroads library.
+
+
+Context
+~~~~~~~
+Before using any Crossroads library functions the caller must initialise a
+'context' using _xs_init()_. The following functions are provided to handle
+initialisation and termination of a 'context':
+
+Initialise Crossroads context::
+ linkxs:xs_init[3]
+
+Terminate Crossroads context::
+ linkxs:xs_term[3]
+
+
+Thread safety
+^^^^^^^^^^^^^
+A 'context' is thread safe and may be shared among as many application
+threads as necessary, without any additional locking required on the part of
+the caller.
+
+Individual Crossroads 'sockets' are _not_ thread safe except in the case where
+full memory barriers are issued when migrating a socket from one thread to
+another. In practice this means applications can create a socket in one thread
+with _xs_socket()_ and then pass it to a _newly created_ thread as part of
+thread initialization, for example via a structure passed as an argument to
+_pthread_create()_.
+
+
+Multiple contexts
+^^^^^^^^^^^^^^^^^
+Multiple 'contexts' may coexist within a single application. Thus, an
+application can use Crossroads directly and at the same time make use of any
+number of additional libraries or components which themselves make use of
+Crossroads as long as the above guidelines regarding thread safety are adhered
+to.
+
+
+Messages
+~~~~~~~~
+A Crossroads message is a discrete unit of data passed between applications or
+components of the same application. Crossroads messages have no internal
+structure and from the point of view of Crossroads themselves they are
+considered to be opaque binary data.
+
+The following functions are provided to work with messages:
+
+Initialise a message::
+ linkxs:xs_msg_init[3]
+ linkxs:xs_msg_init_size[3]
+ linkxs:xs_msg_init_data[3]
+
+Release a message::
+ linkxs:xs_msg_close[3]
+
+Access message content::
+ linkxs:xs_msg_data[3]
+ linkxs:xs_msg_size[3]
+
+Message manipulation::
+ linkxs:xs_msg_copy[3]
+ linkxs:xs_msg_move[3]
+
+
+Sockets
+~~~~~~~
+Crossroads sockets present an abstraction of a asynchronous _message queue_,
+with the exact queueing semantics depending on the socket type in use. See
+linkxs:xs_socket[3] for the socket types provided.
+
+The following functions are provided to work with sockets:
+
+Creating a socket::
+ linkxs:xs_socket[3]
+
+Closing a socket::
+ linkxs:xs_close[3]
+
+Manipulating socket options::
+ linkxs:xs_getsockopt[3]
+ linkxs:xs_setsockopt[3]
+
+Establishing a message flow::
+ linkxs:xs_bind[3]
+ linkxs:xs_connect[3]
+
+Sending and receiving messages::
+ linkxs:xs_send[3]
+ linkxs:xs_recv[3]
+
+.Input/output multiplexing
+Crossroads provide a mechanism for applications to multiplex input/output events
+over a set containing both Crossroads sockets and standard sockets. This
+mechanism mirrors the standard _poll()_ system call, and is described in detail
+in linkxs:xs_poll[3].
+
+
+Transports
+~~~~~~~~~~
+A Crossroads socket can use multiple different underlying transport mechanisms.
+Each transport mechanism is suited to a particular purpose and has its own
+advantages and drawbacks.
+
+The following transport mechanisms are provided:
+
+Unicast transport using TCP::
+ linkxs:xs_tcp[7]
+
+Reliable multicast transport using PGM::
+ linkxs:xs_pgm[7]
+
+Local inter-process communication transport::
+ linkxs:xs_ipc[7]
+
+Local in-process (inter-thread) communication transport::
+ linkxs:xs_inproc[7]
+
+ERROR HANDLING
+--------------
+The Crossroads library functions handle errors using the standard conventions
+found on POSIX systems. Generally, this means that upon failure a Crossroads
+library function shall return either a NULL value (if returning a pointer) or
+a negative value (if returning an integer), and the actual error code shall be
+stored in the 'errno' variable.
+
+On non-POSIX systems some users may experience issues with retrieving the
+correct value of the 'errno' variable. The _xs_errno()_ function is provided
+to assist in these cases; for details refer to linkxs:xs_errno[3].
+
+The _xs_strerror()_ function is provided to translate Crossroads-specific error
+codes into error message strings; for details refer to linkxs:xs_strerror[3].
+
+
+MISCELLANEOUS
+-------------
+The following miscellaneous functions are provided:
+
+Report Crossroads library version::
+ linkxs:xs_version[3]
+
+
+LANGUAGE BINDINGS
+-----------------
+The Crossroads library provides interfaces suitable for calling from programs in
+any language; this documentation documents those interfaces as they would be
+used by C programmers. The intent is that programmers using Crossroads from
+other languages shall refer to this documentation alongside any documentation
+provided by the vendor of their language binding.
+
+AUTHORS
+-------
+The Crossroads documentation was written by Martin Sustrik <sustrik@250bpm.com>
+and Martin Lucina <martin@lucina.net>.
+
+COPYING
+-------
+Free use of Crossroads library is granted under the terms of the GNU Lesser
+General Public License (LGPL). For details see the files `COPYING` and
+`COPYING.LESSER` included with the Crossroads distribution.
diff --git a/doc/zmq_bind.txt b/doc/xs_bind.txt
index 58517ec..8cd49bc 100644
--- a/doc/zmq_bind.txt
+++ b/doc/xs_bind.txt
@@ -1,20 +1,20 @@
-zmq_bind(3)
-===========
+xs_bind(3)
+==========
NAME
----
-zmq_bind - accept connections on a socket
+xs_bind - accept connections on a socket
SYNOPSIS
--------
-*int zmq_bind (void '*socket', const char '*endpoint');*
+*int xs_bind (void '*socket', const char '*endpoint');*
DESCRIPTION
-----------
-The _zmq_bind()_ function shall create an endpoint for accepting connections
+The _xs_bind()_ function shall create an endpoint for accepting connections
and bind it to the socket referenced by the 'socket' argument.
The 'endpoint' argument is a string consisting of two parts as follows:
@@ -24,21 +24,21 @@ the underlying transport protocol selected.
The following transports are defined:
-'inproc':: local in-process (inter-thread) communication transport, see linkzmq:zmq_inproc[7]
-'ipc':: local inter-process communication transport, see linkzmq:zmq_ipc[7]
-'tcp':: unicast transport using TCP, see linkzmq:zmq_tcp[7]
-'pgm', 'epgm':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7]
+'inproc':: local in-process (inter-thread) communication transport, see linkxs:xs_inproc[7]
+'ipc':: local inter-process communication transport, see linkxs:xs_ipc[7]
+'tcp':: unicast transport using TCP, see linkxs:xs_tcp[7]
+'pgm', 'epgm':: reliable multicast transport using PGM, see linkxs:xs_pgm[7]
-With the exception of 'ZMQ_PAIR' sockets, a single socket may be connected to
-multiple endpoints using _zmq_connect()_, while simultaneously accepting
+With the exception of 'XS_PAIR' sockets, a single socket may be connected to
+multiple endpoints using _xs_connect()_, while simultaneously accepting
incoming connections from multiple endpoints bound to the socket using
-_zmq_bind()_. Refer to linkzmq:zmq_socket[3] for a description of the exact
+_xs_bind()_. Refer to linkxs:xs_socket[3] for a description of the exact
semantics involved when connecting or binding a socket to multiple endpoints.
RETURN VALUE
------------
-The _zmq_bind()_ function shall return zero if successful. Otherwise it shall
+The _xs_bind()_ function shall return zero if successful. Otherwise it shall
return `-1` and set 'errno' to one of the values defined below.
@@ -57,7 +57,7 @@ The requested 'address' was not local.
*ENODEV*::
The requested 'address' specifies a nonexistent interface.
*ETERM*::
-The 0MQ 'context' associated with the specified 'socket' was terminated.
+The 'context' associated with the specified 'socket' was terminated.
*ENOTSOCK*::
The provided 'socket' was invalid.
*EMTHREAD*::
@@ -68,26 +68,26 @@ EXAMPLE
-------
.Binding a publisher socket to an in-process and a TCP transport
----
-/* Create a ZMQ_PUB socket */
-void *socket = zmq_socket (context, ZMQ_PUB);
+/* Create a XS_PUB socket */
+void *socket = xs_socket (context, XS_PUB);
assert (socket);
/* Bind it to a in-process transport with the address 'my_publisher' */
-int rc = zmq_bind (socket, "inproc://my_publisher");
+int rc = xs_bind (socket, "inproc://my_publisher");
assert (rc == 0);
/* Bind it to a TCP transport on port 5555 of the 'eth0' interface */
-rc = zmq_bind (socket, "tcp://eth0:5555");
+rc = xs_bind (socket, "tcp://eth0:5555");
assert (rc == 0);
----
SEE ALSO
--------
-linkzmq:zmq_connect[3]
-linkzmq:zmq_socket[3]
-linkzmq:zmq[7]
+linkxs:xs_connect[3]
+linkxs:xs_socket[3]
+linkxs:xs[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
-Martin Lucina <martin@lucina.net>.
+The Crossroads documentation was written by Martin Sustrik <sustrik@250bpm.com>
+and Martin Lucina <martin@lucina.net>.
diff --git a/doc/xs_close.txt b/doc/xs_close.txt
new file mode 100644
index 0000000..99b1ed8
--- /dev/null
+++ b/doc/xs_close.txt
@@ -0,0 +1,52 @@
+xs_close(3)
+===========
+
+
+NAME
+----
+xs_close - close Crossroads socket
+
+
+SYNOPSIS
+--------
+*int xs_close (void '*socket');*
+
+
+DESCRIPTION
+-----------
+The _xs_close()_ function shall destroy the socket referenced by the 'socket'
+argument. Any outstanding messages physically received from the network but not
+yet received by the application with _xs_recv()_ shall be discarded. The
+behaviour for discarding messages sent by the application with _xs_send()_ but
+not yet physically transferred to the network depends on the value of the
+_XS_LINGER_ socket option for the specified 'socket'.
+
+NOTE: The default setting of _XS_LINGER_ does not discard unsent messages;
+this behaviour may cause the application to block when calling _xs_term()_.
+For details refer to linkxs:xs_setsockopt[3] and linkxs:xs_term[3].
+
+
+RETURN VALUE
+------------
+The _xs_close()_ function shall return zero if successful. Otherwise it shall
+return `-1` and set 'errno' to one of the values defined below.
+
+
+ERRORS
+------
+*ENOTSOCK*::
+The provided 'socket' was invalid.
+
+
+SEE ALSO
+--------
+linkxs:xs_socket[3]
+linkxs:xs_term[3]
+linkxs:xs_setsockopt[3]
+linkxs:xs[7]
+
+
+AUTHORS
+-------
+The Crossroads documentation was written by Martin Sustrik <sustrik@250bpm.com>
+and Martin Lucina <martin@lucina.net>.
diff --git a/doc/zmq_connect.txt b/doc/xs_connect.txt
index d0045c4..a0a6ae7 100644
--- a/doc/zmq_connect.txt
+++ b/doc/xs_connect.txt
@@ -1,20 +1,20 @@
-zmq_connect(3)
-==============
+xs_connect(3)
+=============
NAME
----
-zmq_connect - connect a socket
+xs_connect - connect a socket
SYNOPSIS
--------
-*int zmq_connect (void '*socket', const char '*endpoint');*
+*int xs_connect (void '*socket', const char '*endpoint');*
DESCRIPTION
-----------
-The _zmq_connect()_ function shall connect the socket referenced by the
+The _xs_connect()_ function shall connect the socket referenced by the
'socket' argument to the endpoint specified by the 'endpoint' argument.
The 'endpoint' argument is a string consisting of two parts as follows:
@@ -24,25 +24,25 @@ the underlying transport protocol selected.
The following transports are defined:
-'inproc':: local in-process (inter-thread) communication transport, see linkzmq:zmq_inproc[7]
-'ipc':: local inter-process communication transport, see linkzmq:zmq_ipc[7]
-'tcp':: unicast transport using TCP, see linkzmq:zmq_tcp[7]
-'pgm', 'epgm':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7]
+'inproc':: local in-process (inter-thread) communication transport, see linkxs:xs_inproc[7]
+'ipc':: local inter-process communication transport, see linkxs:xs_ipc[7]
+'tcp':: unicast transport using TCP, see linkxs:xs_tcp[7]
+'pgm', 'epgm':: reliable multicast transport using PGM, see linkxs:xs_pgm[7]
-With the exception of 'ZMQ_PAIR' sockets, a single socket may be connected to
-multiple endpoints using _zmq_connect()_, while simultaneously accepting
+With the exception of 'XS_PAIR' sockets, a single socket may be connected to
+multiple endpoints using _xs_connect()_, while simultaneously accepting
incoming connections from multiple endpoints bound to the socket using
-_zmq_bind()_. Refer to linkzmq:zmq_socket[3] for a description of the exact
+_xs_bind()_. Refer to linkxs:xs_socket[3] for a description of the exact
semantics involved when connecting or binding a socket to multiple endpoints.
-NOTE: The connection will not be performed immediately but as needed by 0MQ.
-Thus a successful invocation of _zmq_connect()_ does not indicate that a
+NOTE: The connection will not be performed immediately but as needed by the
+library. Thus a successful invocation of _xs_connect()_ does not indicate that a
physical connection was or can actually be established.
RETURN VALUE
------------
-The _zmq_connect()_ function shall return zero if successful. Otherwise it
+The _xs_connect()_ function shall return zero if successful. Otherwise it
shall return `-1` and set 'errno' to one of the values defined below.
@@ -55,7 +55,7 @@ The requested 'transport' protocol is not supported.
*ENOCOMPATPROTO*::
The requested 'transport' protocol is not compatible with the socket type.
*ETERM*::
-The 0MQ 'context' associated with the specified 'socket' was terminated.
+The 'context' associated with the specified 'socket' was terminated.
*ENOTSOCK*::
The provided 'socket' was invalid.
*EMTHREAD*::
@@ -66,26 +66,26 @@ EXAMPLE
-------
.Connecting a subscriber socket to an in-process and a TCP transport
----
-/* Create a ZMQ_SUB socket */
-void *socket = zmq_socket (context, ZMQ_SUB);
+/* Create a XS_SUB socket */
+void *socket = xs_socket (context, XS_SUB);
assert (socket);
/* Connect it to an in-process transport with the address 'my_publisher' */
-int rc = zmq_connect (socket, "inproc://my_publisher");
+int rc = xs_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");
+rc = xs_connect (socket, "tcp://server001:5555");
assert (rc == 0);
----
SEE ALSO
--------
-linkzmq:zmq_bind[3]
-linkzmq:zmq_socket[3]
-linkzmq:zmq[7]
+linkxs:xs_bind[3]
+linkxs:xs_socket[3]
+linkxs:xs[7]
AUTHORS
-------
-The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
-Martin Lucina <martin@lucina.net>.
+The Crossroads documentation was written by Martin Sustrik <sustrik@250bpm.com>
+and Martin Lucina <martin@lucina.net>.
diff --git a/doc/zmq_epgm.txt b/doc/xs_epgm.txt
index 4d58b1b..4d58b1b 120000
--- a/doc/zmq_epgm.txt
+++ b/doc/xs_epgm.txt
diff --git a/doc/xs_errno.txt b/doc/xs_errno.txt
new file mode 100644
index 0000000..b0cac77
--- /dev/null
+++ b/doc/xs_errno.txt
@@ -0,0 +1,50 @@
+xs_errno(3)
+===========
+
+
+NAME
+----
+xs_errno - retrieve value of errno for the calling thread
+
+
+SYNOPSIS
+--------
+*int xs_errno (void);*
+
+
+DESCRIPTION
+-----------
+The _xs_errno()_ function shall retrieve the value of the 'errno' variable for
+the calling thread.
+
+The _xs_errno()_ function is provided to assist users on non-POSIX systems who
+are experiencing issues with retrieving the correct value of 'errno' directly.
+Specifically, users on Win32 systems whose application is using a different C
+run-time library from the C run-time library in use by Crossroads will need to
+use _xs_errno()_ for correct operation.
+
+IMPORTANT: Users not experiencing issues with retrieving the correct value of
+'errno' should not use this function and should instead access the 'errno'
+variable directly.
+
+
+RETURN VALUE
+------------
+The _xs_errno()_ function shall return the value of the 'errno' variable for
+the calling thread.
+
+
+ERRORS
+------
+No errors are defined.
+
+
+SEE ALSO
+--------
+linkxs:xs[7]
+
+
+AUTHORS
+-------
+The Crossroads documentation was written by Martin Sustrik <sustrik@250bpm.com>
+and Martin Lucina <martin@lucina.net>.
diff --git a/doc/zmq_getmsgopt.txt b/doc/xs_getmsgopt.txt
index a82c30c..4b06322 100644
--- a/doc/zmq_getmsgopt.txt
+++ b/doc/xs_getmsgopt.txt
@@ -1,35 +1,35 @@
-zmq_getmsgopt(3)
-================
+xs_getmsgopt(3)
+===============
NAME
----
-zmq_getmsgopt - retrieve message option
+xs_getmsgopt - retrieve message option
SYNOPSIS
--------
-*int zmq_getmsgopt (zmq_msg_t '*message', int 'option_name', void '*option_value', size_t '*option_len');*
+*int xs_getmsgopt (xs_msg_t '*message', int 'option_name', void '*option_value', size_t '*option_len');*
DESCRIPTION
-----------
-The _zmq_getmsgopt()_ function shall retrieve the value for the option
+The _xs_getmsgopt()_ function shall retrieve the value for the option
specified by the 'option_name' argument for the message pointed to by the
'message' argument, and store it in the buffer pointed to by the 'option_value'
argument. The 'option_len' argument is the size in bytes of the buffer pointed
-to by 'option_value'; upon successful completion _zmq_getsockopt()_ shall
+to by 'option_value'; upon successful completion _xs_getsockopt()_ shall
modify the 'option_len' argument to indicate the actual size of the option
value stored in the buffer.
-The following options can be retrieved with the _zmq_getmsgopt()_ function:
+The following options can be retrieved with the _xs_getmsgopt()_ function:
-*ZMQ_MORE*::
+*XS_MORE*::
Indicates that there are more message parts to follow after the 'message'.
RETURN VALUE
------------
-The _zmq_getmsgopt()_ function shall return zero if successful. Otherwise it
+The _xs_getmsgopt()_ function shall return zero if successful. Otherwise it
shall return `-1` and set 'errno' to one of the values defined below.
@@ -46,17 +46,17 @@ EXAMPLE
-------
.Receiving a multi-part message
----
-zmq_msg_t part;
+xs_msg_t part;
int more;
size_t more_size = sizeof (more);
while (true) {
- /* Create an empty 0MQ message to hold the message part */
- int rc = zmq_msg_init (&part);
+ /* Create an empty message to hold the message part */
+ int rc = xs_msg_init (&part);
assert (rc == 0);
/* Block until a message is available to be received from socket */
- rc = zmq_recvmsg (socket, &part, 0);
+ rc = xs_recvmsg (socket, &part, 0);
assert (rc != -1);
- rc = getmsgopt (&part, ZMQ_MORE, &more, &more_size);
+ rc = getmsgopt (&part, XS_MORE, &more, &more_size);
assert (rc == 0);
if (more) {
fprintf (stderr, "more\n");
@@ -65,21 +65,21 @@ while (true) {
fprintf (stderr, "end\n");
break;
}
- zmq_msg_close (part);
+ xs_msg_close (part);
}
----
SEE ALSO
--------
-linkzmq:zmq_msg_data[3]
-linkzmq:zmq_msg_init[3]
-linkzmq:zmq_msg_init_size[3]
-linkzmq:zmq_msg_init_data[3]
-linkzmq:zmq_msg_close[3]
-linkzmq:zmq[7]
+linkxs:xs_msg_data[3]
+linkxs:xs_msg_init[3]
+linkxs:xs_msg_init_size[3]
+linkxs:xs_msg_init_data[3]
+linkxs:xs_msg_close[3]
+linkxs:xs[7]
AUTHORS
-------
-The 0MQ documentation was wri