Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.SSH.SocketClient

Feature notes: SSH implementation notes

Classes, interfaces and records

classTstSSHSocketClient — component reference

inherits from TstCustomTCPSSHClient

constructor Create(aOwner: TComponent); override;
Drop this component on a form/data module to get a ready-to-use SSH client that talks over a plain TCP socket (tWinSocket on Windows, tPosixSocket elsewhere, both via NewSocket) -- the typical way an application obtains an SSH client component without writing its own tAbstractSocket wrapper. Full description »
destructor Destroy; override;
Closes the underlying socket (ignoring any error from an already-broken connection) and frees it. Application code does not normally call this directly -- it runs when the component itself is destroyed (form/owner teardown or explicit Free). » member page
property SocketClient: tAbstractSocket read fClient;
Gives read-only access to the raw tAbstractSocket backing this SSH client, e.g. to inspect LocalAddress/LocalPort/RemoteAddress/RemotePort or Connected state for diagnostics -- application code normally drives the connection through Host/Port/ConnectToHost/Close instead of using this socket direc... Full description »
property SendTimeout: Cardinal read fSendTimeout write fSendTimeout default cSSHSendTimeoutMSec;
Milliseconds a packet may wait for room in the socket's full send buffer, with not one byte taken, before the connection counts as broken (default 30000). Full description »
property OnRawSend;
Fires after each raw byte send on the underlying TCP socket (see RawSend/DoRawSend). Useful for applications that want to log, meter, or packet-capture the encrypted SSH wire traffic (e.g. bandwidth accounting or troubleshooting a transport issue) without needing to understand SSH framing. Full description »
property OnRawRecvLength;
Fires when the client asks the socket how many bytes are available to read without blocking (see RawRecvLength/DoRawRecvLength). Mainly of interest for the same raw-traffic instrumentation use cases as OnRawSend/OnRawRecv; rarely needed by ordinary application code. Client-side event, mirrored server-side on TstSSHServer. aResult is -1 when the connection has ended with nothing left to read. » member page
property OnRawRecv;
Fires after each raw byte receive on the underlying TCP socket (see RawRecv/DoRawRecv). Together with OnRawSend this lets an application observe or capture the raw encrypted SSH stream, e.g. for logging or a custom traffic monitor. Client-side event, mirrored server-side on TstSSHServer. » member page
property OnRawClose;
Fires when the client-side socket is closed (see RawClose/DoRawClose), whether from an explicit Close/Destroy or a connection failure -- useful for an application that wants to react to disconnection (e.g. update UI state or trigger a reconnect). Client-side event; the server-side equivalent on TstSSHServer fires per accepted connection. » member page
property OnRawConnect;
Fires once the outbound TCP connection to Host:Port has been established (see RawConnect/DoRawConnect), before the SSH protocol handshake begins -- useful for an application that wants to know the moment the transport is up (e.g. to start a connect-time timeout or update UI state) independently o... Full description »