class Server(Connection): (source)
Constructor: Server(sock, protocol, clientAddr, serverAddr, ...)
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 |
Returns an IPv4Address. |
Method | get |
Returns an IPv4Address. |
Instance Variable | client |
Undocumented |
Instance Variable | connected |
Undocumented |
Instance Variable | logstr |
Undocumented |
Instance Variable | repstr |
Undocumented |
Instance Variable | server |
Undocumented |
Instance Variable | sessionno |
Undocumented |
Instance Variable | _tls |
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 |
The connection was lost. |
Method | data |
No summary |
Method | get |
Return a system- and reactor-specific handle. |
Method | get |
Return if SO_KEEPALIVE is enabled. |
Method | get |
Return if TCP_NODELAY is enabled. |
Method | log |
Return the prefix to log with when I own the logging thread. |
Method | lose |
Close the underlying handle or, if TLS has been started, first shut it down. |
Method | read |
Indicates read connection was lost. |
Method | read |
Read into the given buffers from this handle. |
Method | register |
Register a producer. |
Method | set |
Enable/disable SO_KEEPALIVE. |
Method | set |
Enable/disable TCP_NODELAY. |
Method | start |
No summary |
Method | unregister |
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 |
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 |
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 |
Undocumented |
Inherited from FileHandle
(via Connection
):
Method | do |
Undocumented |
Method | do |
Undocumented |
Method | get |
Undocumented |
Method | lose |
Undocumented |
Method | pause |
Pause producing data. |
Method | resume |
Resume producing data. |
Method | start |
Undocumented |
Method | start |
Override in a subclass to cause the reactor to monitor this selectable for write events. This will be called once in unregisterProducer if loseConnection has previously been called, so that the connection can actually close. |
Method | stop |
Stop consuming data. |
Method | stop |
Stop producing data. |
Method | stop |
Undocumented |
Method | stop |
Undocumented |
Method | write |
Indicates write connection was lost. |
Constant | SEND |
Undocumented |
Class Variable | disconnecting |
Undocumented |
Class Variable | dynamic |
Undocumented |
Class Variable | max |
Undocumented |
Class Variable | read |
Undocumented |
Class Variable | write |
Undocumented |
Instance Variable | data |
Undocumented |
Instance Variable | disconnected |
Undocumented |
Instance Variable | offset |
Undocumented |
Instance Variable | producer |
Undocumented |
Instance Variable | producer |
Undocumented |
Instance Variable | reactor |
Undocumented |
Instance Variable | reading |
Undocumented |
Instance Variable | writing |
Undocumented |
Method | _cb |
Undocumented |
Method | _cb |
Undocumented |
Method | _dispatch |
Dispatch previously read data. Return True if self.reading and we don't have any more data |
Method | _handle |
Returns False if we should stop reading for now |
Method | _handle |
Returns false if we should stop writing for now |
Method | _resume |
Undocumented |
Method | _resume |
Undocumented |
Class Variable | _write |
Undocumented |
Instance Variable | _read |
Undocumented |
Instance Variable | _read |
Undocumented |
Instance Variable | _read |
Undocumented |
Instance Variable | _read |
Undocumented |
Instance Variable | _read |
Undocumented |
Instance Variable | _temp |
Undocumented |
Instance Variable | _temp |
Undocumented |
Instance Variable | _write |
Undocumented |
Instance Variable | _write |
Undocumented |
Inherited from _ConsumerMixin
(via Connection
, FileHandle
):
Instance Variable | streaming |
bool or int |
Inherited from _LogOwner
(via Connection
, FileHandle
, _ConsumerMixin
):
Method | _get |
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
, FileHandle
, _ConsumerMixin
, _LogOwner
):
Method | _close |
Undocumented |
Instance Variable | _should |
Set to True if shutdown should be called before calling close on the underlying socket. |
Inherited from _AbortingMixin
(via Connection
, FileHandle
, _ConsumerMixin
, _LogOwner
, _SocketCloser
):
Method | abort |
Aborts the connection immediately, dropping any buffered data. |
Instance Variable | _aborting |
Set to True when abortConnection is called. |
socket.socket
, protocol: IProtocol
, clientAddr: Union[ IPv4Address, IPv6Address]
, serverAddr: Union[ IPv4Address, IPv6Address]
, sessionno: int
, reactor: IOCPReactor
):
(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.