diff options
Diffstat (limited to 'receiver.html')
| -rw-r--r-- | receiver.html | 236 |
1 files changed, 236 insertions, 0 deletions
diff --git a/receiver.html b/receiver.html new file mode 100644 index 0000000..d81d16d --- /dev/null +++ b/receiver.html | |||
| @@ -0,0 +1,236 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
| 2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 3 | |||
| 4 | |||
| 5 | <html xmlns="http://www.w3.org/1999/xhtml"> | ||
| 6 | <head> | ||
| 7 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
| 8 | |||
| 9 | <title>receiver – Receiver — EventMQ 0 documentation</title> | ||
| 10 | |||
| 11 | <link rel="stylesheet" href="_static/classic.css" type="text/css" /> | ||
| 12 | <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> | ||
| 13 | |||
| 14 | <script type="text/javascript"> | ||
| 15 | var DOCUMENTATION_OPTIONS = { | ||
| 16 | URL_ROOT: './', | ||
| 17 | VERSION: '0', | ||
| 18 | COLLAPSE_INDEX: false, | ||
| 19 | FILE_SUFFIX: '.html', | ||
| 20 | HAS_SOURCE: true | ||
| 21 | }; | ||
| 22 | </script> | ||
| 23 | <script type="text/javascript" src="_static/jquery.js"></script> | ||
| 24 | <script type="text/javascript" src="_static/underscore.js"></script> | ||
| 25 | <script type="text/javascript" src="_static/doctools.js"></script> | ||
| 26 | <link rel="top" title="EventMQ 0 documentation" href="index.html" /> | ||
| 27 | <link rel="next" title="router – Router" href="router.html" /> | ||
| 28 | <link rel="prev" title="Welcome to EventMQ’s documentation!" href="index.html" /> | ||
| 29 | </head> | ||
| 30 | <body role="document"> | ||
| 31 | <div class="related" role="navigation" aria-label="related navigation"> | ||
| 32 | <h3>Navigation</h3> | ||
| 33 | <ul> | ||
| 34 | <li class="right" style="margin-right: 10px"> | ||
| 35 | <a href="genindex.html" title="General Index" | ||
| 36 | accesskey="I">index</a></li> | ||
| 37 | <li class="right" > | ||
| 38 | <a href="py-modindex.html" title="Python Module Index" | ||
| 39 | >modules</a> |</li> | ||
| 40 | <li class="right" > | ||
| 41 | <a href="router.html" title="router – Router" | ||
| 42 | accesskey="N">next</a> |</li> | ||
| 43 | <li class="right" > | ||
| 44 | <a href="index.html" title="Welcome to EventMQ’s documentation!" | ||
| 45 | accesskey="P">previous</a> |</li> | ||
| 46 | <li class="nav-item nav-item-0"><a href="index.html">EventMQ 0 documentation</a> »</li> | ||
| 47 | </ul> | ||
| 48 | </div> | ||
| 49 | |||
| 50 | <div class="document"> | ||
| 51 | <div class="documentwrapper"> | ||
| 52 | <div class="bodywrapper"> | ||
| 53 | <div class="body" role="main"> | ||
| 54 | |||
| 55 | <span class="target" id="module-receiver"></span><div class="section" id="receiver-receiver"> | ||
| 56 | <h1><a class="reference internal" href="#module-receiver" title="receiver"><code class="xref py py-mod docutils literal"><span class="pre">receiver</span></code></a> – Receiver<a class="headerlink" href="#receiver-receiver" title="Permalink to this headline">¶</a></h1> | ||
| 57 | <p>The receiver is responsible for receiveing messages</p> | ||
| 58 | <dl class="class"> | ||
| 59 | <dt id="receiver.Receiver"> | ||
| 60 | <em class="property">class </em><code class="descclassname">receiver.</code><code class="descname">Receiver</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#receiver.Receiver" title="Permalink to this definition">¶</a></dt> | ||
| 61 | <dd><p>Receives messages and pass them to a callable.</p> | ||
| 62 | <div class="admonition note"> | ||
| 63 | <p class="first admonition-title">Note</p> | ||
| 64 | <p class="last">Polling with this reciever is currently only available via an eventloop | ||
| 65 | (<code class="xref py py-mod docutils literal"><span class="pre">zmq.eventloop</span></code>).</p> | ||
| 66 | </div> | ||
| 67 | <dl class="attribute"> | ||
| 68 | <dt id="receiver.Receiver.name"> | ||
| 69 | <code class="descname">name</code><a class="headerlink" href="#receiver.Receiver.name" title="Permalink to this definition">¶</a></dt> | ||
| 70 | <dd><p><em>str</em> – Name of this socket</p> | ||
| 71 | </dd></dl> | ||
| 72 | |||
| 73 | <dl class="attribute"> | ||
| 74 | <dt id="receiver.Receiver.zcontext"> | ||
| 75 | <code class="descname">zcontext</code><a class="headerlink" href="#receiver.Receiver.zcontext" title="Permalink to this definition">¶</a></dt> | ||
| 76 | <dd><p><a class="reference external" href="http://pyzmq.readthedocs.org/en/v15.0.0/api/zmq.html#zmq.Context" title="(in PyZMQ v15.0.0)"><code class="xref py py-class docutils literal"><span class="pre">zmq.Context</span></code></a> – socket context</p> | ||
| 77 | </dd></dl> | ||
| 78 | |||
| 79 | <dl class="attribute"> | ||
| 80 | <dt id="receiver.Receiver.zsocket"> | ||
| 81 | <code class="descname">zsocket</code><a class="headerlink" href="#receiver.Receiver.zsocket" title="Permalink to this definition">¶</a></dt> | ||
| 82 | <dd><p><a class="reference external" href="http://pyzmq.readthedocs.org/en/v15.0.0/api/zmq.html#zmq.Socket" title="(in PyZMQ v15.0.0)"><code class="xref py py-class docutils literal"><span class="pre">zmq.Socket</span></code></a> – socket wrapped up in a | ||
| 83 | <code class="xref py py-class docutils literal"><span class="pre">zmqstream.ZMQStream</span></code></p> | ||
| 84 | </dd></dl> | ||
| 85 | |||
| 86 | <dl class="method"> | ||
| 87 | <dt id="receiver.Receiver.__init__"> | ||
| 88 | <code class="descname">__init__</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#receiver.Receiver.__init__" title="Permalink to this definition">¶</a></dt> | ||
| 89 | <dd><div class="admonition note"> | ||
| 90 | <p class="first admonition-title">Note</p> | ||
| 91 | <p class="last">All args are optional unless otherwise noted.</p> | ||
| 92 | </div> | ||
| 93 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 94 | <col class="field-name" /> | ||
| 95 | <col class="field-body" /> | ||
| 96 | <tbody valign="top"> | ||
| 97 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> | ||
| 98 | <li><strong>callable</strong> – REQUIRED A function or method to call when a message is | ||
| 99 | received</li> | ||
| 100 | <li><strong>name</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – name of this socket. By default a uuid will be | ||
| 101 | generated</li> | ||
| 102 | <li><strong>context</strong> (<a class="reference external" href="http://pyzmq.readthedocs.org/en/v15.0.0/api/zmq.html#zmq.Context" title="(in PyZMQ v15.0.0)"><code class="xref py py-class docutils literal"><span class="pre">zmq.Context</span></code></a>) – Context to use when buliding the | ||
| 103 | socket</li> | ||
| 104 | <li><strong>socket</strong> (<a class="reference external" href="http://pyzmq.readthedocs.org/en/v15.0.0/api/zmq.html#zmq.Socket" title="(in PyZMQ v15.0.0)"><code class="xref py py-class docutils literal"><span class="pre">zmq.Socket</span></code></a>) – Should be one of <code class="xref py py-attr docutils literal"><span class="pre">zmq.REP</span></code> or | ||
| 105 | <code class="xref py py-attr docutils literal"><span class="pre">zmq.ROUTER</span></code>. By default a <cite>ROUTER</cite> is used</li> | ||
| 106 | <li><strong>skip_zmqstream</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#bool" title="(in Python v2.7)"><em>bool</em></a>) – If set to true, skip creating the zmqstream | ||
| 107 | socket. Callable is unused and optional when this is True</li> | ||
| 108 | </ul> | ||
| 109 | </td> | ||
| 110 | </tr> | ||
| 111 | <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><code class="xref py py-class docutils literal"><span class="pre">TypeError</span></code> – when <cite>callable</cite> is not callable</p> | ||
| 112 | </td> | ||
| 113 | </tr> | ||
| 114 | </tbody> | ||
| 115 | </table> | ||
| 116 | </dd></dl> | ||
| 117 | |||
| 118 | <dl class="attribute"> | ||
| 119 | <dt id="receiver.Receiver.__weakref__"> | ||
| 120 | <code class="descname">__weakref__</code><a class="headerlink" href="#receiver.Receiver.__weakref__" title="Permalink to this definition">¶</a></dt> | ||
| 121 | <dd><p>list of weak references to the object (if defined)</p> | ||
| 122 | </dd></dl> | ||
| 123 | |||
| 124 | <dl class="method"> | ||
| 125 | <dt id="receiver.Receiver.connect"> | ||
| 126 | <code class="descname">connect</code><span class="sig-paren">(</span><em>addr=None</em><span class="sig-paren">)</span><a class="headerlink" href="#receiver.Receiver.connect" title="Permalink to this definition">¶</a></dt> | ||
| 127 | <dd><p>Connect to address defined by <cite>addr</cite></p> | ||
| 128 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 129 | <col class="field-name" /> | ||
| 130 | <col class="field-body" /> | ||
| 131 | <tbody valign="top"> | ||
| 132 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>addr</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – Address to connect to as a connection string</td> | ||
| 133 | </tr> | ||
| 134 | <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">Exception</span></code></td> | ||
| 135 | </tr> | ||
| 136 | </tbody> | ||
| 137 | </table> | ||
| 138 | </dd></dl> | ||
| 139 | |||
| 140 | <dl class="method"> | ||
| 141 | <dt id="receiver.Receiver.listen"> | ||
| 142 | <code class="descname">listen</code><span class="sig-paren">(</span><em>addr=None</em><span class="sig-paren">)</span><a class="headerlink" href="#receiver.Receiver.listen" title="Permalink to this definition">¶</a></dt> | ||
| 143 | <dd><p>start listening on <cite>addr</cite></p> | ||
| 144 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 145 | <col class="field-name" /> | ||
| 146 | <col class="field-body" /> | ||
| 147 | <tbody valign="top"> | ||
| 148 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>addr</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – Address to listen on as a connction string</td> | ||
| 149 | </tr> | ||
| 150 | <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><code class="xref py py-class docutils literal"><span class="pre">Exception</span></code></td> | ||
| 151 | </tr> | ||
| 152 | </tbody> | ||
| 153 | </table> | ||
| 154 | </dd></dl> | ||
| 155 | |||
| 156 | <dl class="attribute"> | ||
| 157 | <dt id="receiver.Receiver.ready"> | ||
| 158 | <code class="descname">ready</code><a class="headerlink" href="#receiver.Receiver.ready" title="Permalink to this definition">¶</a></dt> | ||
| 159 | <dd><p>Property used to check if this receiver is ready.</p> | ||
| 160 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 161 | <col class="field-name" /> | ||
| 162 | <col class="field-body" /> | ||
| 163 | <tbody valign="top"> | ||
| 164 | <tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the receiver is ready to connect or listen, otherwise | ||
| 165 | False</td> | ||
| 166 | </tr> | ||
| 167 | <tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference external" href="https://docs.python.org/library/functions.html#bool" title="(in Python v2.7)">bool</a></td> | ||
| 168 | </tr> | ||
| 169 | </tbody> | ||
| 170 | </table> | ||
| 171 | </dd></dl> | ||
| 172 | |||
| 173 | </dd></dl> | ||
| 174 | |||
| 175 | </div> | ||
| 176 | |||
| 177 | |||
| 178 | </div> | ||
| 179 | </div> | ||
| 180 | </div> | ||
| 181 | <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> | ||
| 182 | <div class="sphinxsidebarwrapper"> | ||
| 183 | <h4>Previous topic</h4> | ||
| 184 | <p class="topless"><a href="index.html" | ||
| 185 | title="previous chapter">Welcome to EventMQ’s documentation!</a></p> | ||
| 186 | <h4>Next topic</h4> | ||
| 187 | <p class="topless"><a href="router.html" | ||
| 188 | title="next chapter"><code class="docutils literal"><span class="pre">router</span></code> – Router</a></p> | ||
| 189 | <div role="note" aria-label="source link"> | ||
| 190 | <h3>This Page</h3> | ||
| 191 | <ul class="this-page-menu"> | ||
| 192 | <li><a href="_sources/receiver.txt" | ||
| 193 | rel="nofollow">Show Source</a></li> | ||
| 194 | </ul> | ||
| 195 | </div> | ||
| 196 | <div id="searchbox" style="display: none" role="search"> | ||
| 197 | <h3>Quick search</h3> | ||
| 198 | <form class="search" action="search.html" method="get"> | ||
| 199 | <input type="text" name="q" /> | ||
| 200 | <input type="submit" value="Go" /> | ||
| 201 | <input type="hidden" name="check_keywords" value="yes" /> | ||
| 202 | <input type="hidden" name="area" value="default" /> | ||
| 203 | </form> | ||
| 204 | <p class="searchtip" style="font-size: 90%"> | ||
| 205 | Enter search terms or a module, class or function name. | ||
| 206 | </p> | ||
| 207 | </div> | ||
| 208 | <script type="text/javascript">$('#searchbox').show(0);</script> | ||
| 209 | </div> | ||
| 210 | </div> | ||
| 211 | <div class="clearer"></div> | ||
| 212 | </div> | ||
| 213 | <div class="related" role="navigation" aria-label="related navigation"> | ||
| 214 | <h3>Navigation</h3> | ||
| 215 | <ul> | ||
| 216 | <li class="right" style="margin-right: 10px"> | ||
| 217 | <a href="genindex.html" title="General Index" | ||
| 218 | >index</a></li> | ||
| 219 | <li class="right" > | ||
| 220 | <a href="py-modindex.html" title="Python Module Index" | ||
| 221 | >modules</a> |</li> | ||
| 222 | <li class="right" > | ||
| 223 | <a href="router.html" title="router – Router" | ||
| 224 | >next</a> |</li> | ||
| 225 | <li class="right" > | ||
| 226 | <a href="index.html" title="Welcome to EventMQ’s documentation!" | ||
| 227 | >previous</a> |</li> | ||
| 228 | <li class="nav-item nav-item-0"><a href="index.html">EventMQ 0 documentation</a> »</li> | ||
| 229 | </ul> | ||
| 230 | </div> | ||
| 231 | <div class="footer" role="contentinfo"> | ||
| 232 | © Copyright 2015, eventboard.io. | ||
| 233 | Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1. | ||
| 234 | </div> | ||
| 235 | </body> | ||
| 236 | </html> \ No newline at end of file | ||