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#
| Attribute | Type | Description |
|---|---|---|
on_packet | Callable[[bytes, str, int], None] | |
on_read_error | Callable[[DatagramSocketError], None] | |
on_error | Callable[[DatagramSocketError], None] | |
on_close | Callable[[], None] |
Functions#
__init__#
__init__(on_packet, on_read_error, on_error, on_close) -> None| Parameter | Type | Description |
|---|---|---|
on_packet | Callable[[bytes, str, int], None] | |
on_read_error | Callable[[DatagramSocketError], None] | |
on_error | Callable[[DatagramSocketError], None] | |
on_close | Callable[[], None] |