TransportBase constructor
TransportBase({
- required FullAddress bindAddress,
- Future<
void> onMessage(- Packet packet
- int ttl = 5,
- void logger()?,
Creates a new TransportBase instance.
bindAddress The address to bind to for receiving incoming messages.
onMessage The callback function to invoke when a message is received.
ttl The time-to-live for outgoing packets, specifying the maximum number
of hops a packet can traverse before being discarded. Defaults to 5.
logger A function for logging messages related to transport operations.
Implementation
TransportBase({
required this.bindAddress,
this.onMessage,
this.ttl = 5,
this.logger,
});