TransportBase constructor

TransportBase({
  1. required FullAddress bindAddress,
  2. Future<void> onMessage(
    1. Packet packet
    )?,
  3. int ttl = 5,
  4. void logger(
    1. String
    )?,
})

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,
});