summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:06:51 +0900
committerMartin Sustrik <sustrik@250bpm.com>2012-02-16 10:06:51 +0900
commita55458399f9e54f8384eda174d405ee85d490c45 (patch)
tree3a47a24422f1b6924eccb3390c56ad7ced4fcd5d /doc
parentcc571feb7acff6dc247f3dcd9353e110e50f70c7 (diff)
Man page for xs_setctxopt added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/xs_setctxopt.txt70
2 files changed, 71 insertions, 1 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 8704da5..fcd1b4c 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -3,7 +3,7 @@ MAN3 = xs_bind.3 xs_close.3 xs_connect.3 xs_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
+ xs_sendmsg.3 xs_recvmsg.3 xs_getmsgopt.3 xs_setctxopt.3
MAN7 = xs.7 xs_tcp.7 xs_pgm.7 xs_inproc.7 xs_ipc.7
MAN_DOC = $(MAN1) $(MAN3) $(MAN7)
diff --git a/doc/xs_setctxopt.txt b/doc/xs_setctxopt.txt
new file mode 100644
index 0000000..be9e654
--- /dev/null
+++ b/doc/xs_setctxopt.txt
@@ -0,0 +1,70 @@
+xs_setctxopt(3)
+===============
+
+
+NAME
+----
+
+xs_setctxopt - set Crossroads context options
+
+
+SYNOPSIS
+--------
+*int xs_setctxopt (void '*context', int 'option_name', const void '*option_value', size_t 'option_len');*
+
+Caution: All options take effect only if set prior to creating the first socket.
+
+DESCRIPTION
+-----------
+The _xs_setctxopt()_ function shall set the option specified by the
+'option_name' argument to the value pointed to by the 'option_value' argument
+for the Crossroads context pointed to by the 'context' argument.
+The 'option_len' argument is the size of the option value in bytes.
+
+The following options can be set with the _xs_setctxopt()_ function:
+
+
+XS_CTX_MAX_SOCKETS: Set maximum number of sockets
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The 'XS_CTX_MAX_SOCKETS' option shall set specify the maximum nuber of sockets
+that can be open at the same time.
+
+[horizontal]
+Option value type:: int
+Option value unit:: sockets
+Default value:: 512
+
+RETURN VALUE
+------------
+The _xs_setctxopt()_ function shall return zero if successful. Otherwise it
+shall return `-1` and set 'errno' to one of the values defined below.
+
+
+ERRORS
+------
+*EINVAL*::
+The requested option _option_name_ is unknown, or the requested _option_len_ or
+_option_value_ is invalid.
+*EFAULT*::
+The provided 'context' was invalid.
+
+EXAMPLE
+-------
+.Setting maximal number of sockets to three.
+----
+int val = 3;
+rc = xs_setctxopt (context, XS_CTX_MAX_SOCKETS, &val, sizeof (val));
+assert (rc == 0);
+----
+
+SEE ALSO
+--------
+linkxs:xs_getsockopt[3]
+linkxs:xs_setsockopt[3]
+linkxs:xs_init[3]
+linkxs:xs[7]
+
+
+AUTHORS
+-------
+This manual page was written by Martin Sustrik <sustrik@250bpm.com>.