~ubuntu-branches/ubuntu/trusty/twisted/trusty

« back to all changes in this revision

Viewing changes to doc/howto/servers.html

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-01-16 17:44:26 UTC
  • mfrom: (44.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20130116174426-jbisu7qb8o8ncsys
Tags: 12.3.0-1ubuntu1
* Build python3 packages.
* Add '3' as the suffix for the binaries using python3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
    code can be reused for SSL and Unix socket servers). There is
18
18
    a <a href="udp.html" shape="rect">separate document</a> covering UDP.</p>
19
19
 
20
 
    <p>Your protocol handling class will usually subclass <code class="API"><a href="http://twistedmatrix.com/documents/12.2.0/api/twisted.internet.protocol.Protocol.html" title="twisted.internet.protocol.Protocol">twisted.internet.protocol.Protocol</a></code>. Most
 
20
    <p>Your protocol handling class will usually subclass <code class="API"><a href="http://twistedmatrix.com/documents/12.3.0/api/twisted.internet.protocol.Protocol.html" title="twisted.internet.protocol.Protocol">twisted.internet.protocol.Protocol</a></code>. Most
21
21
    protocol handlers inherit either from this class or from one of
22
22
    its convenience children. An instance of the protocol class
23
23
    is instantiated per-connection, on demand, and will go
27
27
 
28
28
    <p>The persistent configuration is kept in a <code>Factory</code>
29
29
    class, which usually inherits
30
 
    from <code class="API"><a href="http://twistedmatrix.com/documents/12.2.0/api/twisted.internet.protocol.Factory.html" title="twisted.internet.protocol.Factory">twisted.internet.protocol.Factory</a></code>. The <code>buildProtocol</code>
 
30
    from <code class="API"><a href="http://twistedmatrix.com/documents/12.3.0/api/twisted.internet.protocol.Factory.html" title="twisted.internet.protocol.Factory">twisted.internet.protocol.Factory</a></code>. The <code>buildProtocol</code>
31
31
    method of the <code>Factory</code> is used to create
32
32
    a <code>Protocol</code> for each new connection.</p>
33
33
 
37
37
    fact does not know anything about the
38
38
    network. See <a href="endpoints.html" shape="rect">the endpoints
39
39
    documentation</a> for more information,
40
 
    or <code class="API"><a href="http://twistedmatrix.com/documents/12.2.0/api/twisted.internet.interfaces.IReactorTCP.listenTCP.html" title="twisted.internet.interfaces.IReactorTCP.listenTCP">twisted.internet.interfaces.IReactorTCP.listenTCP</a></code>,
 
40
    or <code class="API"><a href="http://twistedmatrix.com/documents/12.3.0/api/twisted.internet.interfaces.IReactorTCP.listenTCP.html" title="twisted.internet.interfaces.IReactorTCP.listenTCP">twisted.internet.interfaces.IReactorTCP.listenTCP</a></code>,
41
41
    and the other <code>IReactor*.listen*</code> APIs for the lower
42
42
    level APIs that endpoints are based on.</p>
43
43
 
516
516
</pre><div class="caption">Source listing - <a href="listings/servers/chat.py"><span class="filename">listings/servers/chat.py</span></a></div></div>
517
517
 
518
518
    <p>The only API you might not be familiar with
519
 
    is <code>listenTCP</code>. <code class="API"><a href="http://twistedmatrix.com/documents/12.2.0/api/twisted.internet.interfaces.IReactorTCP.listenTCP.html" title="twisted.internet.interfaces.IReactorTCP.listenTCP">listenTCP</a></code> is
 
519
    is <code>listenTCP</code>. <code class="API"><a href="http://twistedmatrix.com/documents/12.3.0/api/twisted.internet.interfaces.IReactorTCP.listenTCP.html" title="twisted.internet.interfaces.IReactorTCP.listenTCP">listenTCP</a></code> is
520
520
    the method which connects a <code>Factory</code> to the network.
521
521
    This is the lower-level API
522
522
    that <a href="endpoints.html" shape="rect">endpoints</a> wraps for you.</p>
543
543
  </div>
544
544
 
545
545
    <p><a href="index.html">Index</a></p>
546
 
    <span class="version">Version: 12.2.0</span>
 
546
    <span class="version">Version: 12.3.0</span>
547
547
  </body>
548
548
</html>
 
 
b'\\ No newline at end of file'