Transports and protocols (callback based API)
Transports and protocols (callback based API)
1. Transports
Transports are classes provided by asyncio
in order to abstract various kinds of communication channels. You generally won’t instantiate a transport yourself; instead, you will call an AbstractEventLoop
method which will create the transport and try to initiate the underlying communication channel, calling you back when it succeeds.
Once the communication channel is established, a transport is always paired with a p