The Shell type exposes the following members.

Constructors

  NameDescription
Protected methodShell
Initializes a new instance of Shell class based on the specified channel.

Methods

  NameDescription
Public methodClose
Closed the communication channel.
Protected methodDetectKnownShell
This method is a part of the component infrastructure and is not intended to be used directly by user code.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetExitCode
Gets the exit code of the last command, if available. Only supported in Rebex SSH Shell with WellKnownShellMode and for Ssh.StartCommand method. Not supported in Rebex Telnet.
Public methodGetHashCode
Serves as a hash function for a particular type. GetHashCode()()()() is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReadAll()()()()
Reads a multi-line response from the server. Returns null reference (Nothing in Visual Basic) if the end of response has been reached without any preceding data.
Public methodReadAll(array<String>[]()[][])
Reads a multi-line response from the server. Returns if either the question prompt has been received (and no other data are pending) or the end of response has been reached. Returns null reference (Nothing in Visual Basic) if the end of response has been reached without any preceding data.
Public methodReadChar
Reads a character from the server. Returns an EndOfResponse character if the end of response has been reached.
Public methodReadLine()()()()
Reads a single line of response from the server. Returns null reference (Nothing in Visual Basic) if the end of response has been reached without any preceding data.
Public methodReadLine(array<String>[]()[][])
Reads a single line of response from the server. Returns if either end of line was detected or the question prompt has been received (and no other data are pending) or the end of response has been reached. Returns null reference (Nothing in Visual Basic) if the end of response has been reached without any preceding data.
Public methodSendBreak
Sends a break request to the server. This may or may not have any effect. Caution: some Telnet servers don't handle this correctly, causing subsequent commands to fail!
Public methodSendCommand(String)
Sends a command to the server. This assumes that either there is no command running at the moment or that a question prompt was encountered.
Public methodSendCommand(String, Boolean)
Sends a command to the server. This assumes that either there is no command running at the moment or that a question prompt was encountered.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

Fields

  NameDescription
Public fieldStatic memberEndOfResponse
A character that is used by the ReadChar()()()() method to represent an end of response.

Properties

  NameDescription
Public propertyConnected
Returns a value indicating whether the Shell object is connected.
Public propertyEncoding
Gets or sets the character encoding for incoming and outgoing data.
Public propertyIsRunning
Returns a value indicating whether a command is currently running.
Public propertyLastMatchedPrompt
Gets the last matched prompt (set when the end of command response has been reached). Only works in prompt-based mode.
Public propertyMode
Gets the shell mode.
Public propertyPrompt
Gets or sets the prompt sequence that is used to detect response end. To use regular expressions, prepend the string with "regex:". To use wildcards, prepend the string with "mask:". Prompt sequence is only used when shell Mode is Prompt
Public propertyStripEscapeSequences
Gets or sets a value indicating whether to strip escape sequences from the incoming data.
Public propertyTimeout
Gets or sets the length of time in milliseconds before an operation times out (specify -1 or 0 to indicate that the request does not time out).

See Also