Initializes a new instance of the PortMapListener class.
[Visual Basic]Overloads Public Sub New( _
ByVal Address As System.Net.IPAddress, _
ByVal Port As Integer, _
ByVal MapToAddress As System.Net.IPAddress, _
ByVal MapToPort As Integer _
)
[C#]
public PortMapListener(
IPAddress Address,
int Port,
IPAddress MapToAddress,
int MapToPort
);
Parameters
- Address
- The network address to listen on.
- Port
- The port to listen on.
- MapToAddress
- The IP address to forward to.
- MapToPort
- The port to forward to.
Remarks
For security reasons, Address should not be IPAddress.Any.
Exceptions
Exception Type | Condition |
---|---|
System.ArgumentNullException | Address or MapToAddress is null. |
System.ArgumentException | Port or MapToPort is invalid. |
See Also
PortMapListener Class | PortMapListener Members | Org.Mentalis.Proxy.PortMap Namespace | PortMapListener Constructor Overload List