diff options
Diffstat (limited to 'poller.html')
| -rw-r--r-- | poller.html | 284 |
1 files changed, 284 insertions, 0 deletions
diff --git a/poller.html b/poller.html new file mode 100644 index 0000000..9384cd6 --- /dev/null +++ b/poller.html | |||
| @@ -0,0 +1,284 @@ | |||
| 1 | |||
| 2 | |||
| 3 | <!DOCTYPE html> | ||
| 4 | <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> | ||
| 5 | <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> | ||
| 6 | <head> | ||
| 7 | <meta charset="utf-8"> | ||
| 8 | |||
| 9 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| 10 | |||
| 11 | <title>poller – Poller — EventMQ 0 documentation</title> | ||
| 12 | |||
| 13 | |||
| 14 | |||
| 15 | |||
| 16 | |||
| 17 | |||
| 18 | |||
| 19 | |||
| 20 | |||
| 21 | |||
| 22 | |||
| 23 | |||
| 24 | |||
| 25 | |||
| 26 | |||
| 27 | <link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> | ||
| 28 | |||
| 29 | |||
| 30 | |||
| 31 | |||
| 32 | |||
| 33 | <link rel="top" title="EventMQ 0 documentation" href="index.html"/> | ||
| 34 | <link rel="up" title="API Documentation" href="api.html"/> | ||
| 35 | <link rel="next" title="receiver – Receiver" href="receiver.html"/> | ||
| 36 | <link rel="prev" title="jobmanager – Job Manager" href="jobmanager.html"/> | ||
| 37 | |||
| 38 | |||
| 39 | <script src="_static/js/modernizr.min.js"></script> | ||
| 40 | |||
| 41 | </head> | ||
| 42 | |||
| 43 | <body class="wy-body-for-nav" role="document"> | ||
| 44 | |||
| 45 | <div class="wy-grid-for-nav"> | ||
| 46 | |||
| 47 | |||
| 48 | <nav data-toggle="wy-nav-shift" class="wy-nav-side"> | ||
| 49 | <div class="wy-side-scroll"> | ||
| 50 | <div class="wy-side-nav-search"> | ||
| 51 | |||
| 52 | |||
| 53 | |||
| 54 | <a href="index.html" class="icon icon-home"> EventMQ | ||
| 55 | |||
| 56 | |||
| 57 | |||
| 58 | </a> | ||
| 59 | |||
| 60 | |||
| 61 | |||
| 62 | |||
| 63 | <div class="version"> | ||
| 64 | 0 | ||
| 65 | </div> | ||
| 66 | |||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | <div role="search"> | ||
| 71 | <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> | ||
| 72 | <input type="text" name="q" placeholder="Search docs" /> | ||
| 73 | <input type="hidden" name="check_keywords" value="yes" /> | ||
| 74 | <input type="hidden" name="area" value="default" /> | ||
| 75 | </form> | ||
| 76 | </div> | ||
| 77 | |||
| 78 | |||
| 79 | </div> | ||
| 80 | |||
| 81 | <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> | ||
| 82 | |||
| 83 | |||
| 84 | |||
| 85 | <ul class="current"> | ||
| 86 | <li class="toctree-l1 current"><a class="reference internal" href="api.html">API Documentation</a><ul class="current"> | ||
| 87 | <li class="toctree-l2"><a class="reference internal" href="exceptions.html"><code class="docutils literal"><span class="pre">exceptions</span></code> – Exceptions</a></li> | ||
| 88 | <li class="toctree-l2"><a class="reference internal" href="jobmanager.html"><code class="docutils literal"><span class="pre">jobmanager</span></code> – Job Manager</a></li> | ||
| 89 | <li class="toctree-l2 current"><a class="current reference internal" href=""><code class="docutils literal"><span class="pre">poller</span></code> – Poller</a></li> | ||
| 90 | <li class="toctree-l2"><a class="reference internal" href="receiver.html"><code class="docutils literal"><span class="pre">receiver</span></code> – Receiver</a></li> | ||
| 91 | <li class="toctree-l2"><a class="reference internal" href="router.html"><code class="docutils literal"><span class="pre">router</span></code> – Router</a></li> | ||
| 92 | <li class="toctree-l2"><a class="reference internal" href="sender.html"><code class="docutils literal"><span class="pre">sender</span></code> – Sender</a></li> | ||
| 93 | <li class="toctree-l2"><a class="reference internal" href="utils.html"><code class="docutils literal"><span class="pre">utils</span></code> – Utilities</a></li> | ||
| 94 | </ul> | ||
| 95 | </li> | ||
| 96 | <li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing to EventMQ</a></li> | ||
| 97 | </ul> | ||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | </div> | ||
| 102 | </div> | ||
| 103 | </nav> | ||
| 104 | |||
| 105 | <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> | ||
| 106 | |||
| 107 | |||
| 108 | <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> | ||
| 109 | <i data-toggle="wy-nav-top" class="fa fa-bars"></i> | ||
| 110 | <a href="index.html">EventMQ</a> | ||
| 111 | </nav> | ||
| 112 | |||
| 113 | |||
| 114 | |||
| 115 | <div class="wy-nav-content"> | ||
| 116 | <div class="rst-content"> | ||
| 117 | |||
| 118 | |||
| 119 | |||
| 120 | |||
| 121 | |||
| 122 | |||
| 123 | <div role="navigation" aria-label="breadcrumbs navigation"> | ||
| 124 | <ul class="wy-breadcrumbs"> | ||
| 125 | <li><a href="index.html">Docs</a> »</li> | ||
| 126 | |||
| 127 | <li><a href="api.html">API Documentation</a> »</li> | ||
| 128 | |||
| 129 | <li><code class="docutils literal"><span class="pre">poller</span></code> – Poller</li> | ||
| 130 | <li class="wy-breadcrumbs-aside"> | ||
| 131 | |||
| 132 | |||
| 133 | <a href="_sources/poller.txt" rel="nofollow"> View page source</a> | ||
| 134 | |||
| 135 | |||
| 136 | </li> | ||
| 137 | </ul> | ||
| 138 | <hr/> | ||
| 139 | </div> | ||
| 140 | <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> | ||
| 141 | <div itemprop="articleBody"> | ||
| 142 | |||
| 143 | <span class="target" id="module-eventmq.poller"></span><div class="section" id="poller-poller"> | ||
| 144 | <h1><code class="xref py py-mod docutils literal"><span class="pre">poller</span></code> – Poller<a class="headerlink" href="#poller-poller" title="Permalink to this headline">¶</a></h1> | ||
| 145 | <p>Device for polling sockets</p> | ||
| 146 | <dl class="class"> | ||
| 147 | <dt id="eventmq.poller.Poller"> | ||
| 148 | <em class="property">class </em><code class="descclassname">eventmq.poller.</code><code class="descname">Poller</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.poller.Poller" title="Permalink to this definition">¶</a></dt> | ||
| 149 | <dd><p><a class="reference external" href="http://pyzmq.readthedocs.org/en/v15.0.0/api/zmq.html#zmq.Poller" title="(in PyZMQ v15.0.0)"><code class="xref py py-class docutils literal"><span class="pre">zmq.Poller</span></code></a> based class.</p> | ||
| 150 | <dl class="method"> | ||
| 151 | <dt id="eventmq.poller.Poller.__init__"> | ||
| 152 | <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.poller.Poller.__init__" title="Permalink to this definition">¶</a></dt> | ||
| 153 | <dd><p>See <a class="reference external" href="http://pyzmq.readthedocs.org/en/v15.0.0/api/zmq.html#zmq.Poller" title="(in PyZMQ v15.0.0)"><code class="xref py py-class docutils literal"><span class="pre">zmq.Poller</span></code></a></p> | ||
| 154 | </dd></dl> | ||
| 155 | |||
| 156 | <dl class="method"> | ||
| 157 | <dt id="eventmq.poller.Poller.poll"> | ||
| 158 | <code class="descname">poll</code><span class="sig-paren">(</span><em>timeout=1</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.poller.Poller.poll" title="Permalink to this definition">¶</a></dt> | ||
| 159 | <dd><p>Calling <a class="reference external" href="http://pyzmq.readthedocs.org/en/v15.0.0/api/zmq.html#zmq.Poller.poll" title="(in PyZMQ v15.0.0)"><code class="xref py py-meth docutils literal"><span class="pre">zmq.Poller.poll()</span></code></a> directly returns a tuple set. This | ||
| 160 | method typecasts to a dictionary for convience using the socket object | ||
| 161 | as the key. If a socket doesn’t appear in the returned dictionary then | ||
| 162 | no events happened.</p> | ||
| 163 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 164 | <col class="field-name" /> | ||
| 165 | <col class="field-body" /> | ||
| 166 | <tbody valign="top"> | ||
| 167 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>timeout</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – How long should poller wait for before iterating | ||
| 168 | the next loop.</td> | ||
| 169 | </tr> | ||
| 170 | </tbody> | ||
| 171 | </table> | ||
| 172 | <dl class="docutils"> | ||
| 173 | <dt>Returns (dict) Dictionary using the socket as the key and the event the</dt> | ||
| 174 | <dd>socket generated as the value</dd> | ||
| 175 | </dl> | ||
| 176 | </dd></dl> | ||
| 177 | |||
| 178 | <dl class="method"> | ||
| 179 | <dt id="eventmq.poller.Poller.register"> | ||
| 180 | <code class="descname">register</code><span class="sig-paren">(</span><em>socket</em>, <em>flag=0</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.poller.Poller.register" title="Permalink to this definition">¶</a></dt> | ||
| 181 | <dd><p>Register a socket to be polled by this poller</p> | ||
| 182 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 183 | <col class="field-name" /> | ||
| 184 | <col class="field-body" /> | ||
| 185 | <tbody valign="top"> | ||
| 186 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> | ||
| 187 | <li><strong>socket</strong> (<a class="reference external" href="https://docs.python.org/library/socket.html#module-socket" title="(in Python v2.7)"><em>socket</em></a>) – The socket object to register</li> | ||
| 188 | <li><strong>flags</strong> (<a class="reference external" href="https://docs.python.org/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – <code class="xref py py-attr docutils literal"><span class="pre">POLLIN</span></code>, <code class="xref py py-attr docutils literal"><span class="pre">POLLOUT</span></code>, or | ||
| 189 | <code class="xref py py-attr docutils literal"><span class="pre">POLLIN`|:attr:`POLLOUT</span></code> for both. If undefined the | ||
| 190 | socket remains unregistered.</li> | ||
| 191 | </ul> | ||
| 192 | </td> | ||
| 193 | </tr> | ||
| 194 | </tbody> | ||
| 195 | </table> | ||
| 196 | </dd></dl> | ||
| 197 | |||
| 198 | <dl class="method"> | ||
| 199 | <dt id="eventmq.poller.Poller.unregister"> | ||
| 200 | <code class="descname">unregister</code><span class="sig-paren">(</span><em>socket</em><span class="sig-paren">)</span><a class="headerlink" href="#eventmq.poller.Poller.unregister" title="Permalink to this definition">¶</a></dt> | ||
| 201 | <dd><p>Unregister a socket from being polled</p> | ||
| 202 | <table class="docutils field-list" frame="void" rules="none"> | ||
| 203 | <col class="field-name" /> | ||
| 204 | <col class="field-body" /> | ||
| 205 | <tbody valign="top"> | ||
| 206 | <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>socket</strong> (<a class="reference external" href="https://docs.python.org/library/socket.html#module-socket" title="(in Python v2.7)"><em>socket</em></a>) – The socket object to registering</td> | ||
| 207 | </tr> | ||
| 208 | </tbody> | ||
| 209 | </table> | ||
| 210 | </dd></dl> | ||
| 211 | |||
| 212 | </dd></dl> | ||
| 213 | |||
| 214 | </div> | ||
| 215 | |||
| 216 | |||
| 217 | </div> | ||
| 218 | </div> | ||
| 219 | <footer> | ||
| 220 | |||
| 221 | <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> | ||
| 222 | |||
| 223 | <a href="receiver.html" class="btn btn-neutral float-right" title="receiver – Receiver" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> | ||
| 224 | |||
| 225 | |||
| 226 | <a href="jobmanager.html" class="btn btn-neutral" title="jobmanager – Job Manager" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> | ||
| 227 | |||
| 228 | </div> | ||
| 229 | |||
| 230 | |||
| 231 | <hr/> | ||
| 232 | |||
| 233 | <div role="contentinfo"> | ||
| 234 | <p> | ||
| 235 | © Copyright 2015, eventboard.io. | ||
| 236 | |||
| 237 | </p> | ||
| 238 | </div> | ||
| 239 | Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. | ||
| 240 | |||
| 241 | </footer> | ||
| 242 | |||
| 243 | </div> | ||
| 244 | </div> | ||
| 245 | |||
| 246 | </section> | ||
| 247 | |||
| 248 | </div> | ||
| 249 | |||
| 250 | |||
| 251 | |||
| 252 | |||
| 253 | |||
| 254 | <script type="text/javascript"> | ||
| 255 | var DOCUMENTATION_OPTIONS = { | ||
| 256 | URL_ROOT:'./', | ||
| 257 | VERSION:'0', | ||
| 258 | COLLAPSE_INDEX:false, | ||
| 259 | FILE_SUFFIX:'.html', | ||
| 260 | HAS_SOURCE: true | ||
| 261 | }; | ||
| 262 | </script> | ||
| 263 | <script type="text/javascript" src="_static/jquery.js"></script> | ||
| 264 | <script type="text/javascript" src="_static/underscore.js"></script> | ||
| 265 | <script type="text/javascript" src="_static/doctools.js"></script> | ||
| 266 | |||
| 267 | |||
| 268 | |||
| 269 | |||
| 270 | |||
| 271 | <script type="text/javascript" src="_static/js/theme.js"></script> | ||
| 272 | |||
| 273 | |||
| 274 | |||
| 275 | |||
| 276 | <script type="text/javascript"> | ||
| 277 | jQuery(function () { | ||
| 278 | SphinxRtdTheme.StickyNav.enable(); | ||
| 279 | }); | ||
| 280 | </script> | ||
| 281 | |||
| 282 | |||
| 283 | </body> | ||
| 284 | </html> \ No newline at end of file | ||