GetProtocol()
ts
GetProtocol(): string;Returns the protocol currently being used for the ongoing client-server communication.
| Value | Protocol being used |
|---|---|
ssh_shell | SSH2 shell (terminal) |
ssh_exec | SSH2 command via the exec primitive |
ssh_scp | SCP file-transfer session over SSH2 |
ssh_sftp | SFTP file-transfer session over SSH2 |
ftp | Plain unencrypted (insecure) FTP |
ftpes | Encrypted FTPES (via explicit STARTTLS) |
ftps | Implicitly encrypted FTPS |
https | HTTPS (WebClient!) session |
https_share | HTTPS (WebClient!) session on a shared object (file/dir) |
Example
ts
{
if (Session) {
var proto = Session.GetProtocol();
Log('Protocol is: ' + proto); // ex: ssh_sftp
} else {
Log('Session object is not available.');
}
}