GitHub

BackingEvents

API reference for BackingEvents.

Callbacks given to the adapter before it opens the socket (packets may arrive at once), safe to call from any thread. on_packet queues a packet; on_read_error (a terminal receive error) and on_close (the socket closed underneath the reader) stick; on_error reports an error no write is left to fail, such as an ICMP report.

Attributes

AttributeTypeDescription
on_packetCallable[[bytes, str, int], None]
on_read_errorCallable[[DatagramSocketError], None]
on_errorCallable[[DatagramSocketError], None]
on_closeCallable[[], None]

Functions

__init__

__init__(on_packet, on_read_error, on_error, on_close) -> None
ParameterTypeDescription
on_packetCallable[[bytes, str, int], None]
on_read_errorCallable[[DatagramSocketError], None]
on_errorCallable[[DatagramSocketError], None]
on_closeCallable[[], None]