Class ForwardedPortRemote
Provides functionality for remote port forwarding.
public class ForwardedPortRemote : ForwardedPort, IForwardedPort, IDisposable
- Inheritance
-
ForwardedPortRemote
- Implements
- Inherited Members
Constructors
ForwardedPortRemote(IPAddress, uint, IPAddress, uint)
Initializes a new instance of the ForwardedPortRemote class.
public ForwardedPortRemote(IPAddress boundHostAddress, uint boundPort, IPAddress hostAddress, uint port)
Parameters
boundHostAddressIPAddressThe bound host address.
boundPortuintThe bound port.
hostAddressIPAddressThe host address.
portuintThe port.
Exceptions
- ArgumentNullException
boundHostAddressis null.- ArgumentNullException
hostAddressis null.- ArgumentOutOfRangeException
boundPortis greater than MaxPort.- ArgumentOutOfRangeException
portis greater than MaxPort.
ForwardedPortRemote(string, uint, string, uint)
Initializes a new instance of the ForwardedPortRemote class.
public ForwardedPortRemote(string boundHost, uint boundPort, string host, uint port)
Parameters
boundHoststringThe bound host.
boundPortuintThe bound port.
hoststringThe host.
portuintThe port.
ForwardedPortRemote(uint, string, uint)
Initializes a new instance of the ForwardedPortRemote class.
public ForwardedPortRemote(uint boundPort, string host, uint port)
Parameters
Properties
BoundHost
Gets the bound host.
public string BoundHost { get; }
Property Value
BoundHostAddress
Gets the bound host.
public IPAddress BoundHostAddress { get; }
Property Value
BoundPort
Gets the bound port.
public uint BoundPort { get; }
Property Value
Host
Gets the forwarded host.
public string Host { get; }
Property Value
HostAddress
Gets the forwarded host.
public IPAddress HostAddress { get; }
Property Value
IsStarted
Gets a value indicating whether port forwarding is started.
public override bool IsStarted { get; }
Property Value
Port
Gets the forwarded port.
public uint Port { get; }
Property Value
Methods
CheckDisposed()
Ensures the current instance is not disposed.
protected override void CheckDisposed()
Exceptions
- ObjectDisposedException
The current instance is disposed.
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected override void Dispose(bool disposing)
Parameters
disposingbooltrue to release both managed and unmanaged resources; false to release only unmanaged resources.
~ForwardedPortRemote()
Finalizes an instance of the ForwardedPortRemote class.
protected ~ForwardedPortRemote()
StartPort()
Starts remote port forwarding.
protected override void StartPort()
StopPort(TimeSpan)
Stops remote port forwarding.
protected override void StopPort(TimeSpan timeout)
Parameters
timeoutTimeSpanThe maximum amount of time to wait for the port to stop.