Base class for port forwarding functionality.
public abstract class ForwardedPort : IForwardedPort, IDisposable
Inheritance
Gets a value indicating whether port forwarding is started.
public abstract bool IsStarted { get; }
Property Value
Ensures the current instance is not disposed.
protected abstract void CheckDisposed()
Exceptions
The current instance is disposed.
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
to release both managed and unmanaged resources; to release only unmanaged resources.
Raises Renci.SshNet.ForwardedPort.Exception event.
protected void RaiseExceptionEvent(Exception exception)
Parameters
exception
Exception
The exception.
Raises Renci.SshNet.ForwardedPort.RequestReceived event.
protected void RaiseRequestReceived(string host, uint port)
Parameters
host
string
Request originator host.
port
uint
Request originator port.
Starts port forwarding.
public virtual void Start()
Exceptions
The current Renci.SshNet.ForwardedPort is already started -or- is not linked to a SSH session.
The client is not connected.
Starts port forwarding.
protected abstract void StartPort()
Stop()
Stops port forwarding.
public virtual void Stop()
StopPort(TimeSpan)
Stops port forwarding, and waits for the specified timeout until all pending requests are processed.
protected virtual void StopPort(TimeSpan timeout)
Parameters
timeout
TimeSpan
The maximum amount of time to wait for pending requests to finish processing.
The Renci.SshNet.ForwardedPort.Closing event occurs as the forwarded port is being stopped.
public event EventHandler Closing
Event Type
Occurs when an exception is thrown.
public event EventHandler<ExceptionEventArgs> Exception
Event Type
Occurs when a port forwarding request is received.
public event EventHandler<PortForwardEventArgs> RequestReceived
Event Type
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4