Skip to content

GetProtocol()

ts
// in class: Session
function GetProtocol(): string;

This function returns the current protocol the ongoing client-server communication is using.

ValueProtocol being used
ssh_shellSSH2 shell (terminal)
ssh_execSSH2 command via the exec primitive
ssh_scpSCP file-transfer session over SSH2
ssh_sftpSFTP file-transfer session over SSH2
ftpPlain unencrypted (insecure) FTP
ftpesEncrypted FTPES (via explicit STARTTLS)
ftpsImplicitly encrypted FTPS
httpsHTTPS (WebClient!) session
https_shareHTTPS (WebClient!) session on a shared object (file/dir)

Example

ts
{
  var proto = Session.GetProtocol();
  Log('Protocol is: ' + proto);  // ex: ssh_sftp
}