This file is indexed.

/usr/share/doc/python-socketio-doc/html/virtsocket.html is in python-socketio-doc 0.3.6-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>socketio.virtsocket &mdash; gevent-socketio 0.3.1 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '0.3.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="gevent-socketio 0.3.1 documentation" href="index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="index.html">gevent-socketio 0.3.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-socketio.virtsocket">
<span id="socketio-virtsocket"></span><span id="virtsocket-module"></span><h1><a class="reference internal" href="#module-socketio.virtsocket" title="socketio.virtsocket"><tt class="xref py py-mod docutils literal"><span class="pre">socketio.virtsocket</span></tt></a><a class="headerlink" href="#module-socketio.virtsocket" title="Permalink to this headline"></a></h1>
<p>Virtual Socket implementation, unifies all the Transports into one
single interface, and abstracts the work of the long-polling methods.</p>
<p>This module also has the <tt class="docutils literal"><span class="pre">default_error_handler</span></tt> implementation.
You can define your own so that the error messages are logged or sent
in a different way</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">copyright:</th><td class="field-body">2012, Alexandre Bourget &lt;<a class="reference external" href="mailto:alexandre&#46;bourget&#37;&#52;&#48;savoirfairelinux&#46;com">alexandre<span>&#46;</span>bourget<span>&#64;</span>savoirfairelinux<span>&#46;</span>com</a>&gt;</td>
</tr>
<tr class="field-even field"><th class="field-name">moduleauthor:</th><td class="field-body">Alexandre Bourget &lt;<a class="reference external" href="mailto:alexandre&#46;bourget&#37;&#52;&#48;savoirfairelinux&#46;com">alexandre<span>&#46;</span>bourget<span>&#64;</span>savoirfairelinux<span>&#46;</span>com</a>&gt;</td>
</tr>
</tbody>
</table>
<dl class="class">
<dt id="socketio.virtsocket.Socket">
<em class="property">class </em><tt class="descclassname">socketio.virtsocket.</tt><tt class="descname">Socket</tt><big>(</big><em>server</em>, <em>config</em>, <em>error_handler=None</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Virtual Socket implementation, checks heartbeats, writes to local queues
for message passing, holds the Namespace objects, dispatches de packets
to the underlying namespaces.</p>
<p>This is the abstraction on top of the different transports. It&#8217;s like
if you used a WebSocket only...</p>
<dl class="attribute">
<dt id="socketio.virtsocket.Socket.GLOBAL_NS">
<tt class="descname">GLOBAL_NS</tt><em class="property"> = ''</em><a class="headerlink" href="#socketio.virtsocket.Socket.GLOBAL_NS" title="Permalink to this definition"></a></dt>
<dd><p>Use this to be explicit when specifying a Global Namespace (an endpoint
with no name, not &#8216;/chat&#8217; or anything.</p>
</dd></dl>

<dl class="attribute">
<dt id="socketio.virtsocket.Socket.STATE_CONNECTED">
<tt class="descname">STATE_CONNECTED</tt><em class="property"> = 'CONNECTED'</em><a class="headerlink" href="#socketio.virtsocket.Socket.STATE_CONNECTED" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="socketio.virtsocket.Socket.STATE_CONNECTING">
<tt class="descname">STATE_CONNECTING</tt><em class="property"> = 'CONNECTING'</em><a class="headerlink" href="#socketio.virtsocket.Socket.STATE_CONNECTING" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="socketio.virtsocket.Socket.STATE_DISCONNECTED">
<tt class="descname">STATE_DISCONNECTED</tt><em class="property"> = 'DISCONNECTED'</em><a class="headerlink" href="#socketio.virtsocket.Socket.STATE_DISCONNECTED" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="socketio.virtsocket.Socket.STATE_DISCONNECTING">
<tt class="descname">STATE_DISCONNECTING</tt><em class="property"> = 'DISCONNECTING'</em><a class="headerlink" href="#socketio.virtsocket.Socket.STATE_DISCONNECTING" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="socketio.virtsocket.Socket.connected">
<tt class="descname">connected</tt><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.connected"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.connected" title="Permalink to this definition"></a></dt>
<dd><p>Returns whether the state is CONNECTED or not.</p>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.detach">
<tt class="descname">detach</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.detach"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.detach" title="Permalink to this definition"></a></dt>
<dd><p>Detach this socket from the server. This should be done in
conjunction with kill(), once all the jobs are dead, detach the
socket for garbage collection.</p>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.disconnect">
<tt class="descname">disconnect</tt><big>(</big><em>silent=False</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.disconnect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.disconnect" title="Permalink to this definition"></a></dt>
<dd><p>Calling this method will call the
<a class="reference internal" href="namespace.html#socketio.namespace.BaseNamespace.disconnect" title="socketio.namespace.BaseNamespace.disconnect"><tt class="xref py py-meth docutils literal"><span class="pre">disconnect()</span></tt></a> method on
all the active Namespaces that were open, killing all their
jobs and sending &#8216;disconnect&#8217; packets for each of them.</p>
<p>Normally, the Global namespace (endpoint = &#8216;&#8217;) has special meaning,
as it represents the whole connection,</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>silent</strong> &#8211; when True, pass on the <tt class="docutils literal"><span class="pre">silent</span></tt> flag to the Namespace
<a class="reference internal" href="namespace.html#socketio.namespace.BaseNamespace.disconnect" title="socketio.namespace.BaseNamespace.disconnect"><tt class="xref py py-meth docutils literal"><span class="pre">disconnect()</span></tt></a>
calls.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.error">
<tt class="descname">error</tt><big>(</big><em>error_name</em>, <em>error_message</em>, <em>endpoint=None</em>, <em>msg_id=None</em>, <em>quiet=False</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.error" title="Permalink to this definition"></a></dt>
<dd><p>Send an error to the user, using the custom or default
ErrorHandler configured on the [TODO: Revise this] Socket/Handler
object.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>error_name</strong> &#8211; is a simple string, for easy association on
the client side</li>
<li><strong>error_message</strong> &#8211; is a human readable message, the user
will eventually see</li>
<li><strong>endpoint</strong> &#8211; set this if you have a message specific to an
end point</li>
<li><strong>msg_id</strong> &#8211; set this if your error is relative to a
specific message</li>
<li><strong>quiet</strong> &#8211; way to make the error handler quiet. Specific to
the handler.  The default handler will only log,
with quiet.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.get_client_msg">
<tt class="descname">get_client_msg</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.get_client_msg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.get_client_msg" title="Permalink to this definition"></a></dt>
<dd><p>Grab a message to send it to the browser</p>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.get_multiple_client_msgs">
<tt class="descname">get_multiple_client_msgs</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.get_multiple_client_msgs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.get_multiple_client_msgs" title="Permalink to this definition"></a></dt>
<dd><p>Get multiple messages, in case we&#8217;re going through the various
XHR-polling methods, on which we can pack more than one message if the
rate is high, and encode the payload for the HTTP channel.</p>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.get_server_msg">
<tt class="descname">get_server_msg</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.get_server_msg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.get_server_msg" title="Permalink to this definition"></a></dt>
<dd><p>Grab a message, to process it by the server and dispatch calls</p>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.heartbeat">
<tt class="descname">heartbeat</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.heartbeat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.heartbeat" title="Permalink to this definition"></a></dt>
<dd><p>This makes the heart beat for another X seconds.  Call this when
you get a heartbeat packet in.</p>
<p>This clear the heartbeat disconnect timeout (resets for X seconds).</p>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.incr_hits">
<tt class="descname">incr_hits</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.incr_hits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.incr_hits" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="socketio.virtsocket.Socket.json_dumps">
<em class="property">static </em><tt class="descname">json_dumps</tt><big>(</big><em>data</em><big>)</big><a class="headerlink" href="#socketio.virtsocket.Socket.json_dumps" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="staticmethod">
<dt id="socketio.virtsocket.Socket.json_loads">
<em class="property">static </em><tt class="descname">json_loads</tt><big>(</big><em>data</em><big>)</big><a class="headerlink" href="#socketio.virtsocket.Socket.json_loads" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.kill">
<tt class="descname">kill</tt><big>(</big><em>detach=False</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.kill"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.kill" title="Permalink to this definition"></a></dt>
<dd><p>This function must/will be called when a socket is to be completely
shut down, closed by connection timeout, connection error or explicit
disconnection from the client.</p>
<p>It will call all of the Namespace&#8217;s
<a class="reference internal" href="namespace.html#socketio.namespace.BaseNamespace.disconnect" title="socketio.namespace.BaseNamespace.disconnect"><tt class="xref py py-meth docutils literal"><span class="pre">disconnect()</span></tt></a> methods
so that you can shut-down things properly.</p>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.put_client_msg">
<tt class="descname">put_client_msg</tt><big>(</big><em>msg</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.put_client_msg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.put_client_msg" title="Permalink to this definition"></a></dt>
<dd><p>Writes to the client&#8217;s pipe, to end up in the browser</p>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.put_server_msg">
<tt class="descname">put_server_msg</tt><big>(</big><em>msg</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.put_server_msg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.put_server_msg" title="Permalink to this definition"></a></dt>
<dd><p>Writes to the server&#8217;s pipe, to end up in in the Namespaces</p>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.remove_namespace">
<tt class="descname">remove_namespace</tt><big>(</big><em>namespace</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.remove_namespace"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.remove_namespace" title="Permalink to this definition"></a></dt>
<dd><p>This removes a Namespace object from the socket.</p>
<p>This is usually called by
<a class="reference internal" href="namespace.html#socketio.namespace.BaseNamespace.disconnect" title="socketio.namespace.BaseNamespace.disconnect"><tt class="xref py py-meth docutils literal"><span class="pre">disconnect()</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.send_packet">
<tt class="descname">send_packet</tt><big>(</big><em>pkt</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.send_packet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.send_packet" title="Permalink to this definition"></a></dt>
<dd><p>Low-level interface to queue a packet on the wire (encoded as wire
protocol</p>
</dd></dl>

<dl class="method">
<dt id="socketio.virtsocket.Socket.spawn">
<tt class="descname">spawn</tt><big>(</big><em>fn</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#Socket.spawn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.Socket.spawn" title="Permalink to this definition"></a></dt>
<dd><p>Spawn a new Greenlet, attached to this Socket instance.</p>
<p>It will be monitored by the &#8220;watcher&#8221; method</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="socketio.virtsocket.default_error_handler">
<tt class="descclassname">socketio.virtsocket.</tt><tt class="descname">default_error_handler</tt><big>(</big><em>socket</em>, <em>error_name</em>, <em>error_message</em>, <em>endpoint</em>, <em>msg_id</em>, <em>quiet</em><big>)</big><a class="reference internal" href="_modules/socketio/virtsocket.html#default_error_handler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#socketio.virtsocket.default_error_handler" title="Permalink to this definition"></a></dt>
<dd><p>This is the default error handler, you can override this when
calling <a class="reference internal" href="main.html#socketio.socketio_manage" title="socketio.socketio_manage"><tt class="xref py py-func docutils literal"><span class="pre">socketio.socketio_manage()</span></tt></a>.</p>
<p>It basically sends an event through the socket with the &#8216;error&#8217; name.</p>
<p>See documentation for <a class="reference internal" href="#socketio.virtsocket.Socket.error" title="socketio.virtsocket.Socket.error"><tt class="xref py py-meth docutils literal"><span class="pre">Socket.error()</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>quiet</strong> &#8211; if quiet, this handler will not send a packet to the
user, but only log for the server developer.</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/virtsocket.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="index.html">gevent-socketio 0.3.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2011-2014, Jeffrey Gelens, Alexandre Bourget, and John Anderson.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
    </div>
  </body>
</html>