Skip to content

GetProtocol()

ts
GetProtocol(): string;

Returns the protocol currently being used for the ongoing client-server communication.

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
{
  if (Session) {
    var proto = Session.GetProtocol();
    Log('Protocol is: ' + proto);  // ex: ssh_sftp
  } else {
    Log('Session object is not available.');
  }
}