twisted.internet.tcp.Server(_TLSServerMixin, Connection) class documentationtwisted.internet.tcp
          View Source
          (View In Hierarchy)
        
      Known subclasses: twisted.internet.ssl.Server, twisted.internet.unix.Server
Serverside socket-stream connection class.
This is a serverside network connection transport; a socket which came from an accept() on a server.
| Method | __init__ | Server(sock, protocol, client, server, sessionno) | 
| Method | __repr__ | A string representation of this connection. | 
| Method | getHost | Returns an IPv4AddressorIPv6Address. | 
| Method | getPeer | Returns an IPv4AddressorIPv6Address. | 
| Instance Variable | _base | Connection,
which is the base class of this class which has all of the useful file 
descriptor methods.  This is used by_TLSServerMixinto call the right methods to directly manipulate the transport, as is 
necessary for writing TLS-encrypted bytes (whereas those methods onServerwill go 
through another layer of TLS if it has been enabled). | 
| Class Method | _fromConnectedSocket | Create a new Serverbased on an
existing connected SOCK_STREAM socket. | 
Inherited from _AbortingMixin (via Connection):
| Method | abortConnection | Aborts the connection immediately, dropping any buffered data. | 
| Instance Variable | _aborting | Set to TruewhenabortConnectionis called. (type:bool) | 
Inherited from _AbortingMixin (via Connection):
| Method | abortConnection | Aborts the connection immediately, dropping any buffered data. | 
| Instance Variable | _aborting | Set to TruewhenabortConnectionis called. (type:bool) | 
Inherited from _AbortingMixin (via Connection):
| Method | abortConnection | Aborts the connection immediately, dropping any buffered data. | 
| Instance Variable | _aborting | Set to TruewhenabortConnectionis called. (type:bool) | 
Inherited from _AbortingMixin (via Connection):
| Method | abortConnection | Aborts the connection immediately, dropping any buffered data. | 
| Instance Variable | _aborting | Set to TruewhenabortConnectionis called. (type:bool) | 
Inherited from _AbortingMixin (via Connection):
| Method | abortConnection | Aborts the connection immediately, dropping any buffered data. | 
| Instance Variable | _aborting | Set to TruewhenabortConnectionis called. (type:bool) | 
Inherited from _AbortingMixin (via Connection):
| Method | abortConnection | Aborts the connection immediately, dropping any buffered data. | 
| Instance Variable | _aborting | Set to TruewhenabortConnectionis called. (type:bool) | 
Connection,
which is the base class of this class which has all of the useful file 
descriptor methods.  This is used by _TLSServerMixin
to call the right methods to directly manipulate the transport, as is 
necessary for writing TLS-encrypted bytes (whereas those methods on Server will go 
through another layer of TLS if it has been enabled).
  Server(sock, protocol, client, server, sessionno)
Initialize it 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.
Create a new Server based on an
existing connected SOCK_STREAM socket.
Arguments are the same as to Server.__init__,
except where noted.
| Parameters | fileDescriptor | An integer file descriptor associated with a connected socket. The socket must be in non-blocking mode. Any additional attributes desired, such as FD_CLOEXEC, must also be set already. | 
| addressFamily | The address family (sometimes called domain) of the existing socket.
For example, socket.AF_INET. | |
| Returns | A new instance of clswrapping the socket given byfileDescriptor. | |