methodiSSHClientCall.CancelCall
function CancelCall: Boolean;
Cancels a call under way. The thread that makes it ends the connection, with SSH_MSG_DISCONNECT reason 11 as Close does, the next time it reads or sends - at once while it waits for the server, otherwise when the step under way is done (an event handler, such as OnSetKey or OnGetClientPassword) - or when the call ends; it sends the server nothing else after the cancellation. A call cancelled before its version string has gone out sends nothing at all, not even the DISCONNECT, and raises eSSHOutgoingDisconnect once the TCP connect is over. The connect itself is not cut short where the socket waits for it, as a TstSSHSocketClient's does on Windows: the call ends when the server answers, or with the connect's own error when the system gives up. Where it does not, a TstSSHSocketClient's wait for the connect ends at once. Any thread may call it, without the transport's lock. True when a call was under way, or had been cancelled already: the connection is then that thread's to end, and the caller must neither send on the transport nor close it. False outside a call.