autobahn.twisted.util¶
Attributes¶
Functions¶
Create transport details from Twisted transport. |
|
|
Dummy when no TLS is available. |
|
Return a peer descriptor given a Twisted transport, for example: |
|
Inline sleep for use in co-routines (Twisted |
|
Module Contents¶
- __all = ('sleep', 'peer2str', 'transport_channel_id', 'extract_peer_certificate', 'create_transport_details')[source]¶
- create_transport_details(transport: twisted.internet.interfaces.ITransport | twisted.internet.interfaces.IProcessTransport, is_server: bool) autobahn.wamp.types.TransportDetails[source]¶
Create transport details from Twisted transport.
- Parameters:
transport – The Twisted transport to extract information from.
is_server – Flag indicating whether this transport side is a “server” (as in TCP server).
- Returns:
Transport details object filled with information from the Twisted transport.
- extract_peer_certificate(transport: object) Dict[str, Any] | None[source]¶
Dummy when no TLS is available.
- Parameters:
transport – Ignored.
- Returns:
Always return
None.
- peer2str(transport: twisted.internet.interfaces.ITransport | twisted.internet.interfaces.IProcessTransport) str[source]¶
Return a peer descriptor given a Twisted transport, for example:
tcp4:127.0.0.1:52914: a TCPv4 socketunix:/tmp/server.sock: a Unix domain socketprocess:142092: a Pipe originating from a spawning (parent) processpipe: a Pipe terminating in a spawned (child) process
- Returns:
Returns a string representation of the peer of the Twisted transport.