ListenOn typedef
- Future<
Iterable< interfaceAddressesMap< >NetworkInterface, Iterable< >InternetAddress> >
For the socket connection to the Server, this allows you to specify the IP address which the Server should listen on.
Based on the IPVersion passed to the Server (defaults to all), you will receive
interfaceAddresses
which will give all IP addresses found for all interfaces.
You can decide to choose and return one IP address from all discovered.
The chosen IP Address will be used by the Server to listen for client connections.
If the ListenOn option is not specified during the creation of the
Server, the Server will listen on all of the discovered IP addresses.
Implementation
typedef ListenOn = Future<String> Function(Future<Iterable<Map<NetworkInterface, Iterable<InternetAddress>>>> interfaceAddresses);