2.13.ipv8.bootstrapping.udpbroadcast.bootstrapper

Module Contents

Classes

Attributes

2.13.ipv8.bootstrapping.udpbroadcast.bootstrapper.PROTOCOL_VERSION = b'\x00\x00'
2.13.ipv8.bootstrapping.udpbroadcast.bootstrapper.MAGIC = b'IPv8'
2.13.ipv8.bootstrapping.udpbroadcast.bootstrapper.HDR_ANNOUNCE
class 2.13.ipv8.bootstrapping.udpbroadcast.bootstrapper.BroadcastBootstrapEndpoint(overlay: 2.13.ipv8.types.Community)

Bases: asyncio.DatagramProtocol

Endpoint that opens a broadcast socket.

async open() bool

Open the broadcast socket.

send(socket_address: 2.13.ipv8.types.Address, data: bytes) None

Attempt to send data to the given socket address and silently fail.

datagram_received(data: bytes, addr: 2.13.ipv8.types.Address) None

We received data on our broadcast socket.

Note that we do not use the broadcast socket but the overlay socket to send a reply.

close() None

Close this endpoint.

class 2.13.ipv8.bootstrapping.udpbroadcast.bootstrapper.UDPBroadcastBootstrapper(bootstrap_timeout: float = 30.0)

Bases: 2.13.ipv8.bootstrapping.bootstrapper_interface.Bootstrapper

Bootstrapper that finds peers by iterating over ALL 65k ports of the local broadcast address.

async initialize(overlay: 2.13.ipv8.types.Community) bool

Initialize this bootstrapper for the given overlay.

beacon(service_prefix: bytes) None

Try to find a listener (fire and forget).

async get_addresses(overlay: 2.13.ipv8.types.Community, timeout: float) Iterable[2.13.ipv8.types.Address]

Attempt to find addresses. This method will never return addresses immediately.

keep_alive(overlay: 2.13.ipv8.types.Community) None

Send a “keep alive” message.

blacklist() Iterable[2.13.ipv8.types.Address]

Get the blacklisted addresses.

unload() None

Stop this bootstrapper.