C# Class Renci.SshNet.Channels.ChannelSession

Implements Session SSH channel.
Inheritance: Channel
Afficher le fichier Open project: sshnet/SSH.NET Class Usage Examples

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

ChannelSession() public méthode

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.
Résultat System

Close() protected méthode

protected Close ( ) : void
Résultat void

Dispose() protected méthode

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.
Résultat void

OnFailure() protected méthode

Called when channel request failed.
protected OnFailure ( ) : void
Résultat void

OnOpenConfirmation() protected méthode

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.
Résultat void

OnOpenFailure() protected méthode

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.
Résultat void

OnSuccess() protected méthode

Called when channel request was successful
protected OnSuccess ( ) : void
Résultat void

Open() public méthode

Opens the channel.
public Open ( ) : void
Résultat void

SendBreakRequest() public méthode

Sends the exec request.
public SendBreakRequest ( uint breakLength ) : bool
breakLength uint Length of the break.
Résultat bool

SendChannelOpenMessage() protected méthode

Sends the channel open message.
protected SendChannelOpenMessage ( ) : void
Résultat void

SendEndOfWriteRequest() public méthode

Sends [email protected] request.
public SendEndOfWriteRequest ( ) : bool
Résultat bool

SendEnvironmentVariableRequest() public méthode

Sends the environment variable request.
public SendEnvironmentVariableRequest ( string variableName, string variableValue ) : bool
variableName string Name of the variable.
variableValue string The variable value.
Résultat bool

SendExecRequest() public méthode

Sends the exec request.
public SendExecRequest ( string command ) : bool
command string The command.
Résultat bool

SendExitSignalRequest() public méthode

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.
Résultat bool

SendExitStatusRequest() public méthode

Sends the exit status request.
public SendExitStatusRequest ( uint exitStatus ) : bool
exitStatus uint The exit status.
Résultat bool

SendKeepAliveRequest() public méthode

Sends [email protected] request.
public SendKeepAliveRequest ( ) : bool
Résultat bool

SendLocalFlowRequest() public méthode

Sends the local flow request.
public SendLocalFlowRequest ( bool clientCanDo ) : bool
clientCanDo bool if set to true [client can do].
Résultat bool

SendPseudoTerminalRequest() public méthode

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.
Résultat bool

SendShellRequest() public méthode

Sends the shell request.
public SendShellRequest ( ) : bool
Résultat bool

SendSignalRequest() public méthode

Sends the signal request.
public SendSignalRequest ( string signalName ) : bool
signalName string Name of the signal.
Résultat bool

SendSubsystemRequest() public méthode

Sends the subsystem request.
public SendSubsystemRequest ( string subsystem ) : bool
subsystem string The subsystem.
Résultat bool

SendWindowChangeRequest() public méthode

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.
Résultat bool

SendX11ForwardingRequest() public méthode

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.
Résultat bool