diff --git a/doc/modules/zmq.rst b/doc/modules/zmq.rst new file mode 100644 index 0000000..eb4f0b3 --- /dev/null +++ b/doc/modules/zmq.rst @@ -0,0 +1,42 @@ +:mod:`eventlet.green.zmq` -- ØMQ support +======================================== + +.. automodule:: eventlet.green.zmq + :show-inheritance: + +.. currentmodule:: eventlet.green.zmq + +.. autofunction:: Context + +.. autoclass:: _Context + :show-inheritance: + + .. automethod:: socket + +.. autoclass:: Socket + :show-inheritance: + :inherited-members: + + .. automethod:: recv + + .. automethod:: send + +.. module:: zmq + +:mod:`zmq` -- The pyzmq ØMQ python bindings +=========================================== + +:mod:`pyzmq ` [1]_ Is a python binding to the C++ ØMQ [2]_ library written in Cython [3]_. The following is +auto generated :mod:`pyzmq's ` from documentation. +.. autoclass:: zmq.core.context.Context + :members: + +.. autoclass:: zmq.core.socket.Socket + +.. autoclass:: zmq.core.poll.Poller + :members: + + +.. [1] http://github.com/zeromq/pyzmq +.. [2] http://www.zeromq.com +.. [3] http://www.cython.org \ No newline at end of file diff --git a/doc/zeromq.rst b/doc/zeromq.rst new file mode 100644 index 0000000..96db4b9 --- /dev/null +++ b/doc/zeromq.rst @@ -0,0 +1,29 @@ +Zeromq +###### + +What is ØMQ? +============ + +"A ØMQ socket is what you get when you take a normal TCP socket, inject it with a mix of radioactive isotopes stolen +from a secret Soviet atomic research project, bombard it with 1950-era cosmic rays, and put it into the hands of a drug-addled +comic book author with a badly-disguised fetish for bulging muscles clad in spandex." + +Key differences to conventional sockets +Generally speaking, conventional sockets present a synchronous interface to either connection-oriented reliable byte streams (SOCK_STREAM), +or connection-less unreliable datagrams (SOCK_DGRAM). In comparison, 0MQ sockets present an abstraction of an asynchronous message queue, +with the exact queueing semantics depending on the socket type in use. Where conventional sockets transfer streams of bytes or discrete datagrams, +0MQ sockets transfer discrete messages. + +0MQ sockets being asynchronous means that the timings of the physical connection setup and teardown, +reconnect and effective delivery are transparent to the user and organized by 0MQ itself. +Further, messages may be queued in the event that a peer is unavailable to receive them. + +Conventional sockets allow only strict one-to-one (two peers), many-to-one (many clients, one server), +or in some cases one-to-many (multicast) relationships. With the exception of ZMQ::PAIR, +0MQ sockets may be connected to multiple endpoints using connect(), +while simultaneously accepting incoming connections from multiple endpoints bound to the socket using bind(), thus allowing many-to-many relationships. + +API documentation +================= + +ØMQ support is provided in the :mod:`eventlet.green.zmq` module \ No newline at end of file