start method
Starts the router and binds to available network interfaces.
This method initializes the router and starts listening for incoming messages on all available network interfaces. It also binds to the specified port and starts the base router.
port The port to bind to. Defaults to TransportUdp.defaultPort.
Implementation
@override
Future<void> start({int? port}) async {
if (_timer?.isActive ?? false) _timer?.cancel();
_timer = Timer(
debounceInterval,
() async {
await super.start(port: port ?? this.port);
if (kDebugMode) print('P2P network started!');
await _mdns?.start(selfId.value, port ?? this.port);
},
);
}