crossbar.common.twisted.sharedport¶
Classes¶
A custom TCP port which allows to set socket options for sharing TCP ports between multiple processes. |
|
A custom TLS port which allows to set socket options for sharing (the underlying) TCP ports between multiple processes. |
Functions¶
|
Create a new socket for use with Twisted's IReactor.adoptStreamPort. |
Module Contents¶
- class CustomTCPPort(port, factory, backlog=50, interface='', reactor=None, shared=False, user_timeout=None)[source]¶
Bases:
twisted.internet.tcp.PortA custom TCP port which allows to set socket options for sharing TCP ports between multiple processes.
- class CustomTCPTLSPort(port, factory, ctxFactory, backlog=50, interface='', reactor=None, shared=False, user_timeout=None)[source]¶
Bases:
CustomTCPPort,twisted.internet.ssl.PortA custom TLS port which allows to set socket options for sharing (the underlying) TCP ports between multiple processes.
- create_stream_socket(addressFamily, shared=False)[source]¶
Create a new socket for use with Twisted’s IReactor.adoptStreamPort.
- Parameters:
addressFamily (One of socket.AF_INET, socket.AF_INET6, socket.AF_UNIX) – The socket address family.
shared (bool) – If True, request to create a shared, load-balanced socket. When this feature is not available, throw an exception.
:returns obj – A socket.