3.0.ipv8.messaging.interfaces.udp.endpoint
Classes
Module Contents
- class 3.0.ipv8.messaging.interfaces.udp.endpoint.UDPv4Address
Bases:
NamedTupleAn IPv4 address intended for UDP communication.
- class 3.0.ipv8.messaging.interfaces.udp.endpoint.UDPv4LANAddress
Bases:
NamedTupleAn IPv4 address intended for UDP communication over lan networks.
- class 3.0.ipv8.messaging.interfaces.udp.endpoint.UDPv6Address
Bases:
NamedTupleAn IPv6 address intended for UDP communication.
- class 3.0.ipv8.messaging.interfaces.udp.endpoint.DomainAddress
Bases:
NamedTupleA host-port combination for DNS servers.
- class 3.0.ipv8.messaging.interfaces.udp.endpoint.UDPEndpoint(port: int = 0, ip: str = '0.0.0.0')
Bases:
3.0.ipv8.messaging.interfaces.endpoint.Endpoint,asyncio.DatagramProtocolEndpoint that binds UDP (over IPv4 by default).
- SOCKET_FAMILY
- _port
- _ip
- _running = False
- _transport: asyncio.DatagramTransport | None = None
- bytes_up = 0
- bytes_down = 0
- send(socket_address: ipv8.types.Address, packet: bytes) None
Send a packet to a given address.
- Parameters:
socket_address – Tuple of (IP, port) which indicates the destination of the packet.
- log_error(message: str, level: int = logging.WARNING) None
Log a message using our own logger instance.
- async open() bool
Open the Endpoint.
- Returns:
True is the Endpoint was successfully opened, False otherwise.
- assert_open() None
Check if we are opened by the programmer and if the underlying transport is fully open.
- get_address() ipv8.types.Address
Get the address for this Endpoint.