Class SshCustomChannel
- Namespace
- SshSharp
- Assembly
- SshSharp.dll
A channel of a type SshSharp has no API of its own for, opened with OpenChannelAsync(string, ReadOnlyMemory<byte>, CancellationToken). Disposing it (or Stream) closes the channel.
public sealed class SshCustomChannel : IAsyncDisposable, IDisposable
- Inheritance
-
SshCustomChannel
- Implements
- Inherited Members
Properties
- ChannelType
The channel type it was opened with.
- Stream
The channel's data as a duplex stream (asynchronous only): reads return what the server sends, and end (return 0) when it has finished sending. Writes go to the server. Extended data (
SSH_MSG_CHANNEL_EXTENDED_DATA) is dropped. While nothing reads it, the server may send no more than the channel's window (ChannelWindowSize, 2 MiB by default). ShutdownSendAsync(CancellationToken) ends the writing side only.
Methods
- Dispose()
Closes the channel.
- DisposeAsync()
Closes the channel.
- ShutdownSendAsync(CancellationToken)
Ends the writing side of Stream without closing the channel: the server is sent end-of-file (
SSH_MSG_CHANNEL_EOF), and what it sends can still be read. For a protocol where the end of a request is the end of the stream.