GitHub

ReceivedDatagram

API reference for ReceivedDatagram.

A packet a platform socket received. Its sender address is parsed on first read. Pass it as a write's destination (or as the whole write, to echo it) to reply on the raw sender address.

Attributes

AttributeTypeDescription
payload= payload
host= host
port= port
addressInetAddress

Functions

__init__

__init__(payload, host, port, owner) -> None
ParameterTypeDescription
payloadbytes
hoststr
portint
ownerReaderState
def __init__(self, payload: bytes, host: str, port: int, owner: ReaderState) -> None:
    self.payload = payload
    self.host = host
    self.port = port
    self._owner = owner
    self._parsed: InetAddress | None = None