man pages nn_tcpmux(7) and tcpmuxd(1) added

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
diff --git a/Makefile.am b/Makefile.am
index efb2b76..cee77c4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -358,6 +358,7 @@
     doc/nn_inproc.txt \
     doc/nn_ipc.txt \
     doc/nn_tcp.txt \
+    doc/nn_tcpmux.txt \
     doc/nn_ws.txt \
     doc/nn_env.txt
 
@@ -386,7 +387,8 @@
     doc/nn_poll.txt
 
 MAN1 = \
-    doc/nanocat.txt
+    doc/nanocat.txt \
+    doc/tcpmuxd.txt
 
 if DOC
 
diff --git a/doc/nn_tcpmux.txt b/doc/nn_tcpmux.txt
new file mode 100644
index 0000000..06386b8
--- /dev/null
+++ b/doc/nn_tcpmux.txt
@@ -0,0 +1,72 @@
+nn_tcpmux(7)
+============
+
+NAME
+----
+nn_tcpmux - TCPMUX transport mechanism
+
+
+SYNOPSIS
+--------
+*#include <nanomsg/nn.h>*
+
+*#include <nanomsg/tcpmux.h>*
+
+
+DESCRIPTION
+-----------
+
+THIS IS AN EXPERIMENTAL FEATURE. DO NOT USE.
+THE FUNCTIONALITY IS SUBJECT TO CHANGE WITHOUT PRIOR NOTICE.
+
+TCPMUX transport is basically the same as TCP transport
+(see linknanomsg:nn_tcp[7]) except that it allows to specify service names
+along with IP addresses and TCP ports. What it means in practice is that many
+applications on the same box can share the same TCP port.
+
+When connecting and binding use the same connection string syntax as with
+TCP transport, except that the initial protocol specification should be
+'tcpmux://' instead of 'tcp://' and that the connection string should end
+with a slash and a service name:
+
+----
+nn_connect (s, "tcpmux://192.168.0.1:5555/foo");
+----
+
+When binding to a TCPMUX endpoint, linknanomsg:nn_tcpmuxd[1] daemon must be
+running on the box and specified port. There is no such requirement when
+connecting to a TCPMUX endpoint.
+
+
+Socket Options
+~~~~~~~~~~~~~~
+
+NN_TCPMUX_NODELAY::
+    This option, when set to 1, disables Nagle's algorithm. It also disables
+    delaying of TCP acknowledgments. Using this option improves latency at
+    the expense of throughput. Type of this option is int. Default value is 0.
+
+
+EXAMPLE
+-------
+
+----
+nn_bind (s1, "tcpmux://*:5555/foo");
+nn_connect (s2, "tcpmux://server1.example.org:5555/foo");
+----
+
+SEE ALSO
+--------
+linknanomsg:nn_tcpmuxd[1]
+linknanomsg:nn_tcp[7]
+linknanomsg:nn_inproc[7]
+linknanomsg:nn_ipc[7]
+linknanomsg:nn_bind[3]
+linknanomsg:nn_connect[3]
+linknanomsg:nanomsg[7]
+
+
+AUTHORS
+-------
+Martin Sustrik <sustrik@250bpm.com>
+
diff --git a/doc/nn_ws.txt b/doc/nn_ws.txt
index 949a925..5ada854 100644
--- a/doc/nn_ws.txt
+++ b/doc/nn_ws.txt
@@ -16,8 +16,8 @@
 DESCRIPTION
 -----------
 
-THIS IS AN EXPERIMENTAL FEATURE. DO NOT USE. THE FUNCTIONALITY IS SUBJECT TO
-CHANGE WITHOUT NOTICE.
+THIS IS AN EXPERIMENTAL FEATURE. DO NOT USE.
+THE FUNCTIONALITY IS SUBJECT TO CHANGE WITHOUT PRIOR NOTICE.
 
 When calling either `nn_bind()` or `nn_connect()`, omitting the port defaults
 to the RFC 6455 default port 80 for HTTP. Example:
diff --git a/doc/tcpmuxd.txt b/doc/tcpmuxd.txt
new file mode 100644
index 0000000..819ac45
--- /dev/null
+++ b/doc/tcpmuxd.txt
@@ -0,0 +1,41 @@
+tcpmuxd(1)
+==========
+
+NAME
+----
+tcpmuxd - TCP muliplexer daemon
+
+
+SYNOPSIS
+--------
+
+    tcpmuxd PORT
+
+DESCRIPTION
+-----------
+
+THIS IS AN EXPERIMENTAL FEATURE. DO NOT USE.
+THE FUNCTIONALITY IS SUBJECT TO CHANGE WITHOUT PRIOR NOTICE.
+
+TCP multiplexer daemon listens on all network interfaces on TCP port specified
+by argument PORT. On each incoming connection it performs TCPMUX handshake as
+defined in RFC 1078. Then it hands the connection to the application bound to
+the service name specified by the client (see linknanomsg:tcpmux[7] for more
+details).
+
+
+OPTIONS
+-------
+
+There are no options defined.
+
+SEE ALSO
+--------
+linknanomsg:tcpmux[7]
+linknanomsg:nanomsg[7]
+
+AUTHORS
+-------
+
+Martin Sustrik <sustrik@250bpm.com>
+