Poco::Net

class FTPSClientSession

Library: NetSSL_OpenSSL
Package: FTPS
Header: Poco/Net/FTPSClientSession.h

Description

This is an extension of FTPClientSession that supports FTP over SSL/TLS using the AUTH SSL/AUTH TLS and PBSZ/PROT commands according to RFC 4217.

Inheritance

Direct Base Classes: FTPClientSession

All Base Classes: FTPClientSession

Member Summary

Member Functions: enableFTPS, establishDataConnection, forceSessionReuse, isSecure, receiveServerReadyReply

Inherited Functions: abort, activeDataConnection, beginDownload, beginList, beginUpload, cdup, close, createDirectory, endDownload, endList, endTransfer, endUpload, establishDataConnection, extractPath, getFileType, getHost, getPassive, getTimeout, getWorkingDirectory, isLoggedIn, isOpen, isPermanentNegative, isPositiveCompletion, isPositiveIntermediate, isPositivePreliminary, isSecure, isTransientNegative, login, logout, open, parseAddress, parseExtAddress, passiveDataConnection, receiveServerReadyReply, remove, removeDirectory, rename, sendCommand, sendEPRT, sendEPSV, sendPASV, sendPORT, sendPassiveCommand, sendPortCommand, setFileType, setPassive, setTimeout, setWorkingDirectory, systemType, welcomeMessage

Constructors

FTPSClientSession

FTPSClientSession();

Creates an FTPSClientSession.

Passive mode will be used for data transfers.

FTPSClientSession

explicit FTPSClientSession(
    Context::Ptr pContext
);

Creates an FTPSClientSession using the given Context.

Passive mode will be used for data transfers.

FTPSClientSession

FTPSClientSession(
    const StreamSocket & socket,
    bool readWelcomeMessage = true,
    bool enableFTPS = true,
    Context::Ptr pContext = nullptr
);

Creates an FTPSClientSession using the given connected socket for the control connection.

Passive mode will be used for data transfers.

FTPSClientSession

FTPSClientSession(
    const std::string & host,
    Poco::UInt16 port = FTP_PORT,
    const std::string & username = "",
    const std::string & password = "",
    Context::Ptr pContext = nullptr
);

Creates an FTPSClientSession using a socket connected to the given host and port. If username is supplied, login is attempted.

Passive mode will be used for data transfers.

Destructor

~FTPSClientSession virtual

virtual ~FTPSClientSession();

Member Functions

enableFTPS

void enableFTPS(
    bool enable = true
);

Enable or disable FTPS (FTP over SSL/TLS).

forceSessionReuse inline

void forceSessionReuse(
    bool force = true
);

Enable or disable session reusing

isSecure inline

bool isSecure() const;

Returns true if the session is FTPS.

establishDataConnection protected virtual

virtual StreamSocket establishDataConnection(
    const std::string & command,
    const std::string & arg
);

Create secure data connection

receiveServerReadyReply protected virtual

virtual void receiveServerReadyReply();

Function that read server welcome message after connetion and set and make secure socket