Class ForwardedPortLocal
Provides functionality for local port forwarding.
public class ForwardedPortLocal : ForwardedPort, IForwardedPort, IDisposable
- Inheritance
-
ForwardedPortLocal
- Implements
- Inherited Members
Constructors
ForwardedPortLocal(string, string, uint)
Initializes a new instance of the ForwardedPortLocal class.
public ForwardedPortLocal(string boundHost, string host, uint port)
Parameters
Exceptions
- ArgumentNullException
boundHostis null.- ArgumentNullException
hostis null.- ArgumentOutOfRangeException
portis greater than MaxPort.
ForwardedPortLocal(string, uint, string, uint)
Initializes a new instance of the ForwardedPortLocal class.
public ForwardedPortLocal(string boundHost, uint boundPort, string host, uint port)
Parameters
boundHoststringThe bound host.
boundPortuintThe bound port.
hoststringThe host.
portuintThe port.
Exceptions
- ArgumentNullException
boundHostis null.- ArgumentNullException
hostis null.- ArgumentOutOfRangeException
boundPortis greater than MaxPort.- ArgumentOutOfRangeException
portis greater than MaxPort.
ForwardedPortLocal(uint, string, uint)
Initializes a new instance of the ForwardedPortLocal class.
public ForwardedPortLocal(uint boundPort, string host, uint port)
Parameters
Exceptions
- ArgumentOutOfRangeException
boundPortis greater than MaxPort.- ArgumentNullException
hostis null.- ArgumentOutOfRangeException
portis greater than MaxPort.
Properties
BoundHost
Gets the bound host.
public string BoundHost { 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
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.
~ForwardedPortLocal()
Finalizes an instance of the ForwardedPortLocal class.
protected ~ForwardedPortLocal()
StartPort()
Starts local port forwarding.
protected override void StartPort()
StopPort(TimeSpan)
Stops local port forwarding, and waits for the specified timeout until all pending requests are processed.
protected override void StopPort(TimeSpan timeout)
Parameters
timeoutTimeSpanThe maximum amount of time to wait for pending requests to finish processing.