Listener. Allow Nat Traversal(Boolean) Method
Enables or disables Network Address Translation (NAT) traversal on a TcpListener instance.
public: void AllowNatTraversal(bool allowed);
public void AllowNatTraversal (bool allowed);
member this.AllowNatTraversal : bool -> unit
Public Sub AllowNatTraversal (allowed As Boolean)
A Boolean value that specifies whether to enable or disable NAT traversal.
allowed parameter is true, the IPProtectionLevel option on the associated socket is set to Unrestricted. This may allow NAT traversal for a TcpListener depending on firewall rules in place on the system.
The AllowNatTraversal method must be invoked prior to calling the Start method to begin listening for incoming connection requests (before the socket is bound). If AllowNatTraversal method is called after the Start method, then an InvalidOperationException will be thrown.
A Teredo address is an IPv6 address with the prefix of 2001::/32. Teredo addresses can be returned through normal DNS name resolution or enumerated as an IPv6 address assigned to a local interface.