Table of Contents

Class SshConnectionEvent

Namespace
SshSharp.Extensions.DependencyInjection
Assembly
SshSharp.Extensions.DependencyInjection.dll

A change of an endpoint's shared connection, from WatchAsync(string, CancellationToken). It names the endpoint by its registered name only; no host or user name is in it.

public sealed class SshConnectionEvent
Inheritance
SshConnectionEvent
Inherited Members

Properties

Client

The client concerned: the new connection for Connected and Reconnected (owned by the provider: do not dispose it), the one that ended for Disconnected (no longer usable).

EndpointName

The endpoint, as registered with AddSshClient.

Error

Why the connection ended (ConnectionError): for Disconnected, and for Reconnected the reason the previous connection ended. Null for Connected. Its message can hold the server's disconnect text: log it, but keep it out of public responses.

Kind

What happened.

Timestamp

When it happened (from the container's TimeProvider, if one is registered).