C# Класс Renci.SshNet.Channels.ChannelSession

Implements Session SSH channel.
Наследование: Channel
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
ChannelSession ( ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize ) : System

Initializes a new ChannelSession instance.

Open ( ) : void

Opens the channel.

SendBreakRequest ( uint breakLength ) : bool

Sends the exec request.

SendEndOfWriteRequest ( ) : bool

Sends [email protected] request.

SendEnvironmentVariableRequest ( string variableName, string variableValue ) : bool

Sends the environment variable request.

SendExecRequest ( string command ) : bool

Sends the exec request.

SendExitSignalRequest ( string signalName, bool coreDumped, string errorMessage, string language ) : bool

Sends the exit signal request.

SendExitStatusRequest ( uint exitStatus ) : bool

Sends the exit status request.

SendKeepAliveRequest ( ) : bool

Sends [email protected] request.

SendLocalFlowRequest ( bool clientCanDo ) : bool

Sends the local flow request.

SendPseudoTerminalRequest ( string environmentVariable, uint columns, uint rows, uint width, uint height, uint>.IDictionary terminalModeValues ) : bool

Sends the pseudo terminal request.

SendShellRequest ( ) : bool

Sends the shell request.

SendSignalRequest ( string signalName ) : bool

Sends the signal request.

SendSubsystemRequest ( string subsystem ) : bool

Sends the subsystem request.

SendWindowChangeRequest ( uint columns, uint rows, uint width, uint height ) : bool

Sends the window change request.

SendX11ForwardingRequest ( bool isSingleConnection, string protocol, byte cookie, uint screenNumber ) : bool

Sends the X11 forwarding request.

Защищенные методы

Метод Описание
Close ( ) : void
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

OnFailure ( ) : void

Called when channel request failed.

OnOpenConfirmation ( uint remoteChannelNumber, uint initialWindowSize, uint maximumPacketSize ) : void

Called when channel is opened by the server.

OnOpenFailure ( uint reasonCode, string description, string language ) : void

Called when channel failed to open.

OnSuccess ( ) : void

Called when channel request was successful

SendChannelOpenMessage ( ) : void

Sends the channel open message.

Приватные методы

Метод Описание
ReleaseSemaphore ( ) : void

Releases the session semaphore.

When the session semaphore has already been released, or was never obtained by this instance, then this method does nothing.

Описание методов

ChannelSession() публичный Метод

Initializes a new ChannelSession instance.
public ChannelSession ( ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize ) : System
session ISession The session.
localChannelNumber uint The local channel number.
localWindowSize uint Size of the window.
localPacketSize uint Size of the packet.
Результат System

Close() защищенный Метод

protected Close ( ) : void
Результат void

Dispose() защищенный Метод

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
Результат void

OnFailure() защищенный Метод

Called when channel request failed.
protected OnFailure ( ) : void
Результат void

OnOpenConfirmation() защищенный Метод

Called when channel is opened by the server.
protected OnOpenConfirmation ( uint remoteChannelNumber, uint initialWindowSize, uint maximumPacketSize ) : void
remoteChannelNumber uint The remote channel number.
initialWindowSize uint Initial size of the window.
maximumPacketSize uint Maximum size of the packet.
Результат void

OnOpenFailure() защищенный Метод

Called when channel failed to open.
protected OnOpenFailure ( uint reasonCode, string description, string language ) : void
reasonCode uint The reason code.
description string The description.
language string The language.
Результат void

OnSuccess() защищенный Метод

Called when channel request was successful
protected OnSuccess ( ) : void
Результат void

Open() публичный Метод

Opens the channel.
public Open ( ) : void
Результат void

SendBreakRequest() публичный Метод

Sends the exec request.
public SendBreakRequest ( uint breakLength ) : bool
breakLength uint Length of the break.
Результат bool

SendChannelOpenMessage() защищенный Метод

Sends the channel open message.
protected SendChannelOpenMessage ( ) : void
Результат void

SendEndOfWriteRequest() публичный Метод

Sends [email protected] request.
public SendEndOfWriteRequest ( ) : bool
Результат bool

SendEnvironmentVariableRequest() публичный Метод

Sends the environment variable request.
public SendEnvironmentVariableRequest ( string variableName, string variableValue ) : bool
variableName string Name of the variable.
variableValue string The variable value.
Результат bool

SendExecRequest() публичный Метод

Sends the exec request.
public SendExecRequest ( string command ) : bool
command string The command.
Результат bool

SendExitSignalRequest() публичный Метод

Sends the exit signal request.
public SendExitSignalRequest ( string signalName, bool coreDumped, string errorMessage, string language ) : bool
signalName string Name of the signal.
coreDumped bool if set to true [core dumped].
errorMessage string The error message.
language string The language.
Результат bool

SendExitStatusRequest() публичный Метод

Sends the exit status request.
public SendExitStatusRequest ( uint exitStatus ) : bool
exitStatus uint The exit status.
Результат bool

SendKeepAliveRequest() публичный Метод

Sends [email protected] request.
public SendKeepAliveRequest ( ) : bool
Результат bool

SendLocalFlowRequest() публичный Метод

Sends the local flow request.
public SendLocalFlowRequest ( bool clientCanDo ) : bool
clientCanDo bool if set to true [client can do].
Результат bool

SendPseudoTerminalRequest() публичный Метод

Sends the pseudo terminal request.
public SendPseudoTerminalRequest ( string environmentVariable, uint columns, uint rows, uint width, uint height, uint>.IDictionary terminalModeValues ) : bool
environmentVariable string The environment variable.
columns uint The columns.
rows uint The rows.
width uint The width.
height uint The height.
terminalModeValues uint>.IDictionary The terminal mode values.
Результат bool

SendShellRequest() публичный Метод

Sends the shell request.
public SendShellRequest ( ) : bool
Результат bool

SendSignalRequest() публичный Метод

Sends the signal request.
public SendSignalRequest ( string signalName ) : bool
signalName string Name of the signal.
Результат bool

SendSubsystemRequest() публичный Метод

Sends the subsystem request.
public SendSubsystemRequest ( string subsystem ) : bool
subsystem string The subsystem.
Результат bool

SendWindowChangeRequest() публичный Метод

Sends the window change request.
public SendWindowChangeRequest ( uint columns, uint rows, uint width, uint height ) : bool
columns uint The columns.
rows uint The rows.
width uint The width.
height uint The height.
Результат bool

SendX11ForwardingRequest() публичный Метод

Sends the X11 forwarding request.
public SendX11ForwardingRequest ( bool isSingleConnection, string protocol, byte cookie, uint screenNumber ) : bool
isSingleConnection bool if set to true the it is single connection.
protocol string The protocol.
cookie byte The cookie.
screenNumber uint The screen number.
Результат bool