runtimepy.net.tcp package#
Subpackages#
- runtimepy.net.tcp.http package
- Module contents
HttpConnectionHttpConnection.envHttpConnection.expecting_responseHttpConnection.get_handler()HttpConnection.handlersHttpConnection.identityHttpConnection.init()HttpConnection.log_aliasHttpConnection.log_prefixHttpConnection.loggerHttpConnection.process_binary()HttpConnection.remote_addressHttpConnection.request()HttpConnection.request_json()HttpConnection.tx_binary_hwmHttpConnection.tx_text_hwm
to_json()
- Module contents
- runtimepy.net.tcp.telnet package
Submodules#
runtimepy.net.tcp.connection module#
A module implementing a TCP connection interface.
- class runtimepy.net.tcp.connection.EchoTcpConnection(transport: Transport, protocol: QueueProtocol)[source]#
Bases:
TcpConnection,EchoConnectionAn echo connection for TCP.
- class runtimepy.net.tcp.connection.NullTcpConnection(transport: Transport, protocol: QueueProtocol)[source]#
Bases:
TcpConnection,NullConnectionA null TCP connection.
- class runtimepy.net.tcp.connection.TcpConnection(transport: Transport, protocol: QueueProtocol)[source]#
Bases:
Connection,TransportMixinA TCP connection interface.
- async classmethod app(stop_sig: Event, callback: Callable[[T], None] = None, serving_callback: Callable[[Any], None] = None, manager: ConnectionManager = None, **kwargs) None[source]#
Run an application that serves new connections.
- async classmethod create_connection(backoff: ExponentialBackoff = None, **kwargs) T[source]#
Create a TCP connection.
- env: ChannelEnvironment#
- log_alias = 'TCP'#
- log_prefix = ''#
- logger: LoggerType#
- remote_address: _Optional[_IpHost]#
- async restart() bool[source]#
Reset necessary underlying state for this connection to ‘process’ again.
- classmethod serve(callback: Callable[[T], None] = None, **kwargs) AsyncIterator[Any][source]#
Serve incoming connections.
- tx_binary_hwm: int#
- tx_text_hwm: int#
- uses_binary_tx_queue = False#
- uses_text_tx_queue = False#
runtimepy.net.tcp.create module#
A module for instantiating the underlying networking resources for TcpConnection.
- async runtimepy.net.tcp.create.tcp_transport_protocol(**kwargs) tuple[Transport, QueueProtocol][source]#
Create a transport and protocol pair relevant for this class’s implementation.
- async runtimepy.net.tcp.create.tcp_transport_protocol_backoff(backoff: ExponentialBackoff = None, **kwargs) tuple[Transport, QueueProtocol][source]#
Create a transport and protocol pair relevant for this class’s implementation.
- async runtimepy.net.tcp.create.try_tcp_transport_protocol(callback: Callable[[tuple[Transport, QueueProtocol]], None] = None, **kwargs) tuple[Transport, QueueProtocol] | None[source]#
Attempt to create a transport and protocol pair.
runtimepy.net.tcp.protocol module#
A module implementing a Protocol for TcpConnection.
- class runtimepy.net.tcp.protocol.QueueProtocol[source]#
Bases:
BinaryMessageQueueMixin,ProtocolA simple streaming protocol that populates a message queue.
- conn: Connection#
- logger: Logger | LoggerAdapter[Any]#
Module contents#
A module aggregating all TCP-related interfaces.
- class runtimepy.net.tcp.EchoTcpConnection(transport: Transport, protocol: QueueProtocol)[source]#
Bases:
TcpConnection,EchoConnectionAn echo connection for TCP.
- class runtimepy.net.tcp.NullTcpConnection(transport: Transport, protocol: QueueProtocol)[source]#
Bases:
TcpConnection,NullConnectionA null TCP connection.
- class runtimepy.net.tcp.TcpConnection(transport: Transport, protocol: QueueProtocol)[source]#
Bases:
Connection,TransportMixinA TCP connection interface.
- async classmethod app(stop_sig: Event, callback: Callable[[T], None] = None, serving_callback: Callable[[Any], None] = None, manager: ConnectionManager = None, **kwargs) None[source]#
Run an application that serves new connections.
- async classmethod create_connection(backoff: ExponentialBackoff = None, **kwargs) T[source]#
Create a TCP connection.
- env: ChannelEnvironment#
- log_alias = 'TCP'#
- log_prefix = ''#
- logger: LoggerType#
- remote_address: _Optional[_IpHost]#
- async restart() bool[source]#
Reset necessary underlying state for this connection to ‘process’ again.
- classmethod serve(callback: Callable[[T], None] = None, **kwargs) AsyncIterator[Any][source]#
Serve incoming connections.
- tx_binary_hwm: int#
- tx_text_hwm: int#
- uses_binary_tx_queue = False#
- uses_text_tx_queue = False#