AutoNATv2Impl constructor

AutoNATv2Impl(
  1. Host host,
  2. Host dialerHost, {
  3. List<AutoNATv2Option>? options,
})

Create a new AutoNAT v2 service

host and dialerHost should have the same dialing capabilities. In case the host doesn't support a transport, dial back requests for address for that transport will be ignored.

Implementation

AutoNATv2Impl(Host host, Host dialerHost, {List<AutoNATv2Option>? options})
    : host = host,
      allowPrivateAddrs = _applyOptions(options).allowPrivateAddrs,
      server = AutoNATv2ServerImpl(host, dialerHost, _applyOptions(options)),
      client = AutoNATv2ClientImpl(host),
      _subscription = _subscribeToEvents(host);