Table of Contents

Class: Server Twisted-0.17.4/twisted/internet/tcp.py

Serverside socket-stream connection class.

I am a serverside network connection transport; a socket which came from an accept() on a server. Programmers for the twisted.net framework should not have to use me directly, since I am automatically instantiated in TCPServer's doRead method. For documentation on what I do, refer to the documentation for twisted.protocols.protocol.Transport.

Base Classes   
Connection
    abstract.FileDescriptor
    protocol.Transport
    styles.Ephemeral
Methods   
__init__
__repr__
getHost
getPeer
  __init__ 
__init__ (
        self,
        sock,
        protocol,
        client,
        server,
        sessionno,
        )

Server(sock, protocol, client, server, sessionno)

Initialize me with a socket, a protocol, a descriptor for my peer (a tuple of host, port describing the other end of the connection), an instance of Port, and a session number.

  __repr__ 
__repr__ ( self )

A string representation of this connection.

  getHost 
getHost ( self )

Returns a tuple of (INET, hostname, port).

This indicates the servers address.

  getPeer 
getPeer ( self )

Returns a tuple of (INET, hostname, port), indicating the connected client's address.


Table of Contents

This document was automatically generated on Sat Apr 20 01:30:49 2002 by HappyDoc version 2.0