enableService function

AutoNATOption enableService(
  1. Network dialer
)

Implementation

AutoNATOption enableService(Network dialer) {
  return AutoNATOption((AutoNATConfig c) {
    if (dialer == c.host.network || dialer.peerstore == c.host.peerStore) {
      throw ArgumentError("Dialer should not be that of the host or share its peerstore");
    }
    c.dialer = dialer;
  });
}