diff options
Diffstat (limited to 'sender.html')
| -rw-r--r-- | sender.html | 253 |
1 files changed, 253 insertions, 0 deletions
diff --git a/sender.html b/sender.html new file mode 100644 index 0000000..57f5345 --- /dev/null +++ b/sender.html | |||
| @@ -0,0 +1,253 @@ | |||
| 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>sender – Sender — 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="prev" title="router – Router" href="router.html" /> | ||
| 28 | </head> | ||
| 29 | <body role="document"> | ||
| 30 | <div class="related" role="navigation" aria-label="related navigation"> | ||
| 31 | <h3>Navigation</h3> | ||
| 32 | <ul> | ||
| 33 | <li class="right" style="margin-right: 10px"> | ||
| 34 | <a href="genindex.html" title="General Index" | ||
| 35 | accesskey="I">index</a></li> | ||
| 36 | <li class="right" > | ||
| 37 | <a href="py-modindex.html" title="Python Module Index" | ||
| 38 | >modules</a> |</li> | ||
| 39 | <li class="right" > | ||
| 40 | <a href="router.html" title="router – Router" | ||
| 41 | accesskey="P">previous</a> |</li> | ||
| 42 | <li class="nav-item nav-item-0"><a href="index.html">EventMQ 0 documentation</a> »</li> | ||
| 43 | </ul> | ||
| 44 | </div> | ||
| 45 | |||
| 46 | <div class="document"> | ||
| 47 | <div class="documentwrapper"> | ||
| 48 | <div class="bodywrapper"> | ||
| 49 | <div class="body" role="main"> | ||
| 50 | |||
| 51 | <span class="target" id="module-eventmq.sender"></span><div class="section" id="sender-sender"> | ||
| 52 | <h1><code class="xref py py-mod docutils literal"><span class="pre">sender</span></code> – Sender<a class="headerlink" href="#sender-sender" title="Permalink to this headline">¶</a></h1> | ||
| 53 | <p>The sender is responsible for sending messages</p> | ||
| 54 | <dl class="class"> | ||
| 55 | <dt id="eventmq.sender.Sender"> | ||
| 56 | <em class="property">class </em><code class="descclassname">eventmq.sender.</code><code class="descname">Sender</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.sender.Sender" title="Permalink to this definition">¶</a></dt> | ||
| 57 | <dd><p>Sends messages to a particular socket</p> | ||
| 58 | <div class="admonition note"> | ||
| 59 | <p class="first admonition-title">Note</p> | ||
| 60 | <p class="last">Polling with this sender is currently only available via an eventloop | ||
| 61 | (<code class="xref py py-mod docutils literal"><span class="pre">zmq.eventloop</span></code>)</p> | ||
| 62 | </div> | ||
| 63 | <dl class="attribute"> | ||
| 64 | <dt id="eventmq.sender.Sender.name"> | ||
| 65 | <code class="descname">name</code><a class="headerlink" href="#eventmq.sender.Sender.name" title="Permalink to this definition">¶</a></dt> | ||
| 66 | <dd><p><em>str</em> – Name of this socket</p> | ||
| 67 | </dd></dl> | ||
| 68 | |||
| 69 | <dl class="attribute"> | ||
| 70 | <dt> | ||
| 71 | <code class="descname">zcontext (</code></dt> | ||
| 72 | <dd><p>class`zmq.Context`): socket context</p> | ||
| 73 | </dd></dl> | ||
| 74 | |||
| 75 | <dl class="attribute"> | ||
| 76 | <dt id="eventmq.sender.Sender.zsocket"> | ||
| 77 | <code class="descname">zsocket</code><a class="headerlink" href="#eventmq.sender.Sender.zsocket" title="Permalink to this definition">¶</a></dt> | ||
| 78 | <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 | ||
| 79 | <code class="xref py py-class docutils literal"><span class="pre">zmqstream.ZMQStream</span></code></p> | ||
| 80 | </dd></dl> | ||
| 81 | |||
| 82 | <dl class="method"> | ||
| 83 | <dt id="eventmq.sender.Sender.__init__"> | ||
| 84 | <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="#eventmq.sender.Sender.__init__" title="Permalink to this definition">¶</a></dt> | ||
| 85 | <dd><div class="admonition note"> | ||
| 86 | <p class="first admonition-title">Note</p> | ||
| 87 | <p class="last">All args are optional unless otherwise noted.</p> | ||
| 88 | </div> | ||
| 89 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 90 | <col class="field-name" /> | ||
| 91 | <col class="field-body" /> | ||
| 92 | <tbody valign="top"> | ||
| 93 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> | ||
| 94 | <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 | ||
| 95 | generated</li> | ||
| 96 | <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 building the | ||
| 97 | socket</li> | ||
| 98 | <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.REQ</span></code> or | ||
| 99 | <code class="xref py py-attr docutils literal"><span class="pre">zmq.DEALER</span></code>. By default a <cite>DEALER</cite> is used</li> | ||
| 100 | <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 | ||
| 101 | socket</li> | ||
| 102 | </ul> | ||
| 103 | </td> | ||
| 104 | </tr> | ||
| 105 | </tbody> | ||
| 106 | </table> | ||
| 107 | </dd></dl> | ||
| 108 | |||
| 109 | <dl class="attribute"> | ||
| 110 | <dt id="eventmq.sender.Sender.__weakref__"> | ||
| 111 | <code class="descname">__weakref__</code><a class="headerlink" href="#eventmq.sender.Sender.__weakref__" title="Permalink to this definition">¶</a></dt> | ||
| 112 | <dd><p>list of weak references to the object (if defined)</p> | ||
| 113 | </dd></dl> | ||
| 114 | |||
| 115 | <dl class="method"> | ||
| 116 | <dt id="eventmq.sender.Sender.connect"> | ||
| 117 | <code class="descname">connect</code><span class="sig-paren">(</span><em>addr=None</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.sender.Sender.connect" title="Permalink to this definition">¶</a></dt> | ||
| 118 | <dd><p>Connect to address defined by <cite>addr</cite></p> | ||
| 119 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 120 | <col class="field-name" /> | ||
| 121 | <col class="field-body" /> | ||
| 122 | <tbody valign="top"> | ||
| 123 | <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> | ||
| 124 | </tr> | ||
| 125 | <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> | ||
| 126 | </tr> | ||
| 127 | </tbody> | ||
| 128 | </table> | ||
| 129 | </dd></dl> | ||
| 130 | |||
| 131 | <dl class="method"> | ||
| 132 | <dt id="eventmq.sender.Sender.listen"> | ||
| 133 | <code class="descname">listen</code><span class="sig-paren">(</span><em>addr=None</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.sender.Sender.listen" title="Permalink to this definition">¶</a></dt> | ||
| 134 | <dd><p>start listening on <cite>addr</cite></p> | ||
| 135 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 136 | <col class="field-name" /> | ||
| 137 | <col class="field-body" /> | ||
| 138 | <tbody valign="top"> | ||
| 139 | <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> | ||
| 140 | </tr> | ||
| 141 | <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> | ||
| 142 | </tr> | ||
| 143 | </tbody> | ||
| 144 | </table> | ||
| 145 | </dd></dl> | ||
| 146 | |||
| 147 | <dl class="attribute"> | ||
| 148 | <dt id="eventmq.sender.Sender.ready"> | ||
| 149 | <code class="descname">ready</code><a class="headerlink" href="#eventmq.sender.Sender.ready" title="Permalink to this definition">¶</a></dt> | ||
| 150 | <dd><p>Property used to check if this receiver is ready.</p> | ||
| 151 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 152 | <col class="field-name" /> | ||
| 153 | <col class="field-body" /> | ||
| 154 | <tbody valign="top"> | ||
| 155 | <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 | ||
| 156 | False</td> | ||
| 157 | </tr> | ||
| 158 | <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> | ||
| 159 | </tr> | ||
| 160 | </tbody> | ||
| 161 | </table> | ||
| 162 | </dd></dl> | ||
| 163 | |||
| 164 | <dl class="method"> | ||
| 165 | <dt id="eventmq.sender.Sender.send"> | ||
| 166 | <code class="descname">send</code><span class="sig-paren">(</span><em>message</em>, <em>queue=None</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.sender.Sender.send" title="Permalink to this definition">¶</a></dt> | ||
| 167 | <dd><p>Sends a message</p> | ||
| 168 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 169 | <col class="field-name" /> | ||
| 170 | <col class="field-body" /> | ||
| 171 | <tbody valign="top"> | ||
| 172 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> | ||
| 173 | <li><strong>message</strong> – message to send to something</li> | ||
| 174 | <li><strong>queue</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) – queue topic</li> | ||
| 175 | </ul> | ||
| 176 | </td> | ||
| 177 | </tr> | ||
| 178 | </tbody> | ||
| 179 | </table> | ||
| 180 | </dd></dl> | ||
| 181 | |||
| 182 | <dl class="method"> | ||
| 183 | <dt id="eventmq.sender.Sender.send_raw"> | ||
| 184 | <code class="descname">send_raw</code><span class="sig-paren">(</span><em>raw_message</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.sender.Sender.send_raw" title="Permalink to this definition">¶</a></dt> | ||
| 185 | <dd><p>Send a message directly to the 0mq socket</p> | ||
| 186 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 187 | <col class="field-name" /> | ||
| 188 | <col class="field-body" /> | ||
| 189 | <tbody valign="top"> | ||
| 190 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>raw_message</strong> (<em>tuple, list</em>) – Raw message to send.</td> | ||
| 191 | </tr> | ||
| 192 | </tbody> | ||
| 193 | </table> | ||
| 194 | </dd></dl> | ||
| 195 | |||
| 196 | </dd></dl> | ||
| 197 | |||
| 198 | </div> | ||
| 199 | |||
| 200 | |||
| 201 | </div> | ||
| 202 | </div> | ||
| 203 | </div> | ||
| 204 | <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> | ||
| 205 | <div class="sphinxsidebarwrapper"> | ||
| 206 | <h4>Previous topic</h4> | ||
| 207 | <p class="topless"><a href="router.html" | ||
| 208 | title="previous chapter"><code class="docutils literal"><span class="pre">router</span></code> – Router</a></p> | ||
| 209 | <div role="note" aria-label="source link"> | ||
| 210 | <h3>This Page</h3> | ||
| 211 | <ul class="this-page-menu"> | ||
| 212 | <li><a href="_sources/sender.txt" | ||
| 213 | rel="nofollow">Show Source</a></li> | ||
| 214 | </ul> | ||
| 215 | </div> | ||
| 216 | <div id="searchbox" style="display: none" role="search"> | ||
| 217 | <h3>Quick search</h3> | ||
| 218 | <form class="search" action="search.html" method="get"> | ||
| 219 | <input type="text" name="q" /> | ||
| 220 | <input type="submit" value="Go" /> | ||
| 221 | <input type="hidden" name="check_keywords" value="yes" /> | ||
| 222 | <input type="hidden" name="area" value="default" /> | ||
| 223 | </form> | ||
| 224 | <p class="searchtip" style="font-size: 90%"> | ||
| 225 | Enter search terms or a module, class or function name. | ||
| 226 | </p> | ||
| 227 | </div> | ||
| 228 | <script type="text/javascript">$('#searchbox').show(0);</script> | ||
| 229 | </div> | ||
| 230 | </div> | ||
| 231 | <div class="clearer"></div> | ||
| 232 | </div> | ||
| 233 | <div class="related" role="navigation" aria-label="related navigation"> | ||
| 234 | <h3>Navigation</h3> | ||
| 235 | <ul> | ||
| 236 | <li class="right" style="margin-right: 10px"> | ||
| 237 | <a href="genindex.html" title="General Index" | ||
| 238 | >index</a></li> | ||
| 239 | <li class="right" > | ||
| 240 | <a href="py-modindex.html" title="Python Module Index" | ||
| 241 | >modules</a> |</li> | ||
| 242 | <li class="right" > | ||
| 243 | <a href="router.html" title="router – Router" | ||
| 244 | >previous</a> |</li> | ||
| 245 | <li class="nav-item nav-item-0"><a href="index.html">EventMQ 0 documentation</a> »</li> | ||
| 246 | </ul> | ||
| 247 | </div> | ||
| 248 | <div class="footer" role="contentinfo"> | ||
| 249 | © Copyright 2015, eventboard.io. | ||
| 250 | Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1. | ||
| 251 | </div> | ||
| 252 | </body> | ||
| 253 | </html> \ No newline at end of file | ||