GetProtocol()
ts
// in class: Session
function GetProtocol(): string;
This function returns the current protocol the ongoing client-server communication is using.
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
{
var proto = Session.GetProtocol();
Log('Protocol is: ' + proto); // ex: ssh_sftp
}