class documentation

class Server(Connection): (source)

View In Hierarchy

Serverside socket-stream connection class.

I am 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 get​Host Returns an IPv4Address.
Method get​Peer Returns an IPv4Address.
Instance Variable client​Addr Undocumented
Instance Variable connected Undocumented
Instance Variable logstr Undocumented
Instance Variable repstr Undocumented
Instance Variable server​Addr Undocumented
Instance Variable sessionno Undocumented
Instance Variable _tls​Client​Default Always False, indicating that this is a server connection, and by default when TLS is negotiated this class will act as a TLS server.

Inherited from Connection:

Method connection​Lost The connection was lost.
Method data​Received
Method get​Handle Return a system- and reactor-specific handle.
Method get​Tcp​Keep​Alive Return if SO_KEEPALIVE is enabled.
Method get​Tcp​No​Delay Return if TCP_NODELAY is enabled.
Method log​Prefix Return the prefix to log with when I own the logging thread.
Method lose​Connection Close the underlying handle or, if TLS has been started, first shut it down.
Method read​Connection​Lost Indicates read connection was lost.
Method read​From​Handle Read into the given buffers from this handle.
Method register​Producer Register a producer.
Method set​Tcp​Keep​Alive Enable/disable SO_KEEPALIVE.
Method set​Tcp​No​Delay Enable/disable TCP_NODELAY.
Method start​TLS
Method unregister​Producer Unregister a producer.
Method write Write some data, either directly to the underlying handle or, if TLS has been started, to the TLSMemoryBIOProtocol for it to encrypt and send.
Method write​Sequence Write some data, either directly to the underlying handle or, if TLS has been started, to the TLSMemoryBIOProtocol for it to encrypt and send.
Method write​To​Handle Send buff to current file handle using _iocp.send. The buffer sent is limited to a size of self.SEND_LIMIT.
Constant TLS False to indicate the connection is in normal TCP mode, True to indicate that TLS has been started and that operations must be routed through the TLSMemoryBIOProtocol instance.
Instance Variable protocol Undocumented
Instance Variable socket Undocumented
Method _close​Write​Connection Undocumented

Inherited from FileHandle (via Connection):

Method do​Read Undocumented
Method do​Write Undocumented
Method get​File​Handle Undocumented
Method lose​Write​Connection Undocumented
Method pause​Producing Pause producing data.
Method resume​Producing Resume producing data.
Method start​Reading Undocumented
Method start​Writing No summary
Method stop​Consuming Stop consuming data.
Method stop​Producing Stop producing data.
Method stop​Reading Undocumented
Method stop​Writing Undocumented
Method write​Connection​Lost Indicates write connection was lost.
Constant SEND​_LIMIT Undocumented
Class Variable disconnecting Undocumented
Class Variable dynamic​Read​Buffers Undocumented
Class Variable max​Read​Buffers Undocumented
Class Variable read​Buffer​Size Undocumented
Class Variable write​Buffer​Size Undocumented
Instance Variable data​Buffer Undocumented
Instance Variable disconnected Undocumented
Instance Variable offset Undocumented
Instance Variable producer Undocumented
Instance Variable producer​Paused Undocumented
Instance Variable reactor Undocumented
Instance Variable reading Undocumented
Instance Variable writing Undocumented
Method _cb​Read Undocumented
Method _cb​Write Undocumented
Method _dispatch​Data Dispatch previously read data. Return True if self.reading and we don't have any more data
Method _handle​Read Returns False if we should stop reading for now
Method _handle​Write Returns false if we should stop writing for now
Method _resume​Reading Undocumented
Method _resume​Writing Undocumented
Class Variable _write​Disconnected Undocumented
Instance Variable _read​Buffers Undocumented
Instance Variable _read​Next​Buffer Undocumented
Instance Variable _read​Scheduled Undocumented
Instance Variable _read​Scheduled​In​OS Undocumented
Instance Variable _read​Size Undocumented
Instance Variable _temp​Data​Buffer Undocumented
Instance Variable _temp​Data​Len Undocumented
Instance Variable _write​Disconnecting Undocumented
Instance Variable _write​Scheduled Undocumented

Inherited from _ConsumerMixin (via Connection, FileHandle):

Instance Variable streaming​Producer bool or int

Inherited from _LogOwner (via Connection, FileHandle):

Method _get​Log​Prefix Determine the log prefix to use for messages related to applicationObject, which may or may not be an interfaces.ILoggingContext provider.

Inherited from _SocketCloser (via Connection):

Method _close​Socket Undocumented
Instance Variable _should​Shutdown Set to True if shutdown should be called before calling close on the underlying socket.

Inherited from _AbortingMixin (via Connection):

Method abort​Connection Aborts the connection immediately, dropping any buffered data.
Instance Variable do​Read Undocumented
Instance Variable do​Write Undocumented
Instance Variable _aborting Set to True when abortConnection is called.
def __init__(self, sock, protocol, clientAddr, serverAddr, sessionno, reactor): (source)

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.

def __repr__(self): (source)
A string representation of this connection.
Returns
strUndocumented
def getHost(self): (source)

Returns an IPv4Address.

This indicates the server's address.

def getPeer(self): (source)

Returns an IPv4Address.

This indicates the client's address.

clientAddr = (source)

Undocumented

repstr = (source)

Undocumented

serverAddr = (source)

Undocumented

sessionno = (source)

Undocumented

_tlsClientDefault: bool = (source)
Always False, indicating that this is a server connection, and by default when TLS is negotiated this class will act as a TLS server.