Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodTstCustomSSHServer.Disconnect

procedure Disconnect(aSocket: Cardinal);
Forcibly tears down the peer session currently bound to the given raw socket handle. An app calls this to drop a specific connected client (e.g. an admin "kick" action) when it still holds the socket handle it passed to StartPeerTransport. Server-side only.

A client that has not finished logging in is dropped by the connection's own thread, which the login uses: Disconnect returns at once, and that thread sends SSH_MSG_DISCONNECT (reason 11) and closes the connection as soon as it next reads or sends - at once while it waits for the client, otherwise once the step under way is done (checking a password or a key, or an event handler), with nothing sent to the client in between. A client that has logged in is dropped here and now.