On this page
asyncio.BaseTransport
Prev: asyncio.BaseProtocol | Up: asyncio | Next: asyncio.BoundedSemaphore
Rel: asyncio.AbstractEventLoop, asyncio.AbstractServer, asyncio.all_tasks, asyncio.as_completed
Ref: docs.python.org — asyncio.BaseTransport
Tags: #public #python3 #stdlib #asyncio
Import
import asyncio
from asyncio import BaseTransport
Signature & Overview
asyncio.BaseTransport(extra=None)
Base class for transports.
Methods & Attributes
BaseTransport.close(self)— Close the transport.BaseTransport.get_extra_info(self, name, default=None)— Get optional transport information.BaseTransport.get_protocol(self)— Return the current protocol.BaseTransport.is_closing(self)— Return True if the transport is closing or closed.BaseTransport.set_protocol(self, protocol)— Set a new protocol.
Usage
import asyncio
# Low-level transport abstraction paired with BaseProtocol
assert hasattr(asyncio.BaseTransport, "close")
Gotchas
- Created by the event loop: You receive a transport in
protocol.connection_made(transport)—never instantiateBaseTransportdirectly.
REPL Inspect
from asyncio import BaseTransport
help(BaseTransport)
Linked from
Related notes
- tuts/python3/stdlib_module/asyncio/BaseProtocol Linked here; links to this page; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/BoundedSemaphore Linked here; links to this page; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/asyncio/AbstractEventLoop Linked here; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/AbstractServer Linked here; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/all_tasks Linked here; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/as_completed Linked here; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/Barrier shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/BaseEventLoop shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/BrokenBarrierError shared tags: #asyncio, #stdlib