Mono.Nat.NatUtility.Handle C# (CSharp) Method

Handle() public static method

public static Handle ( IPAddress localAddress, byte response, IPEndPoint endpoint, NatProtocol protocol ) : void
localAddress System.Net.IPAddress
response byte
endpoint System.Net.IPEndPoint
protocol NatProtocol
return void
	    public static void Handle(IPAddress localAddress, byte[] response, IPEndPoint endpoint, NatProtocol protocol)
	    {
	        switch (protocol)
	        {
                case NatProtocol.Upnp:
	                UpnpSearcher.Instance.Handle(localAddress, response, endpoint);
	                break;
                case NatProtocol.Pmp:
	                PmpSearcher.Instance.Handle(localAddress, response, endpoint);
	                break;
	            default:
	                throw new ArgumentException("Unexpected protocol: " + protocol);
	        }
	    }
	}