Table of Contents

Method DisposeAsync

Namespace
SshSharp
Assembly
SshSharp.dll

DisposeAsync()

Cancels the forwarding on the server (cancel-streamlocal-forward@openssh.com) and closes every forwarded connection. For a forwarding to a handler, the token each handler was given is cancelled, and this waits up to HandlerShutdownTimeout (5 seconds by default) for the handlers to return; the connections of any still running then are closed under them, and this returns without waiting for them further. A connection the server opened before the cancel, but that reaches this forwarder only after disposal has gathered the connections it waits for, is closed without being served.

public ValueTask DisposeAsync()

Returns

ValueTask