Added zmq docs back in after deleting them b y accident

This commit is contained in:
Ben Ford 2010-12-04 23:24:58 +00:00
parent b0d1ce5659
commit 274e23d83a
2 changed files with 71 additions and 0 deletions

42
doc/modules/zmq.rst Normal file
View File

@ -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 <zmq>` [1]_ Is a python binding to the C++ ØMQ [2]_ library written in Cython [3]_. The following is
auto generated :mod:`pyzmq's <zmq>` 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

29
doc/zeromq.rst Normal file
View File

@ -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