class asyncio.BaseTransport
Base class for transports.
-
close(self)
-
Close the transport. If the transport has a buffer for outgoing data, buffered data will be flushed asynchronously. No more data will be received. After all buffered data is flushed, the protocol’s
connection_lost()
method will be called withNone
as its argument.
-
is_closing(self)
-
Return
True
if the transport is closing or is closed.New in version 3.5.1.
-
get_extra_info(name, default=None)
-
Return optional transport information. name is a string representing the piece of transport-specific information to get, default is the value to return if the information doesn’t exist.
This method allows transport implementations to easily expose channel-specific information.
- socket:
-
'peername'
: the remote address to which the socket is connected, result ofsocket.socket.getpeername()
(None
on error) -
'socket'
:socket.socket
instance -
'sockname'
: the socket’s own address, result ofsocket.socket.getsockname()
-
- SSL socket:
-
'compression'
: the compression algorithm being used as a string, orNone
if the connection isn’t compressed; result ofssl.SSLSocket.compression()
-
'cipher'
: a three-value tuple containing the name of the cipher being used, the version of the SSL protocol that defines its use, and the number of secret bits being used; result ofssl.SSLSocket.cipher()
-
'peercert'
: peer certificate; result ofssl.SSLSocket.getpeercert()
-
'sslcontext'
:ssl.SSLContext
instance -
'ssl_object'
:ssl.SSLObject
orssl.SSLSocket
instance
-
- pipe:
-
'pipe'
: pipe object
-
- subprocess:
-
'subprocess'
:subprocess.Popen
instance
-
- socket:
Changed in version 3.5.1: 'ssl_object'
info was added to SSL sockets.
Please login to continue.