warsvrprotocolftpdataconn.h

来自「ftpserver very good sample」· C头文件 代码 · 共 98 行

H
98
字号
/**     This implements the data connection of a FTP session.    The data connection is used for passicve and     active transfers. In the case of passive transfers,     the socket will first listen for a connection, and    then reassign the internal socket to the connected    socket when the other side connects.*/#ifndef WAR_SVR_PROTOCOL_FTP_DATA_CONN_H#define WAR_SVR_PROTOCOL_FTP_DATA_CONN_H/* SYSTEM INCLUDES *//* PROJECT INCLUDES */#ifndef WAR__TRANSFER_SOCKET_H#   include "WarTransferSocket.h"#endif#ifndef WAR_SVR_FILE_H#   include "WarSvrFile.h"#endif/* LOCAL INCLUDES *//* FORWARD REFERENCES */class WarSocketIo;class WarSvrProtocolFtp;#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplusclass WarSvrProtocolFtpDataConn : public WarTransferSocket{public:    /**    * Default constructor.    */    WarSvrProtocolFtpDataConn(        war_socket_io_ptr_t& companionPtr,        WarSvrProtocolFtp& rServer);          // OPERATORS    // OPERATIONS       virtual void SendFile(war_svrfile_ptr_t& filePtr);    virtual void ReceiveFile(war_svrfile_ptr_t& filePtr);    // ACCESS    // INQUIRY    protected:    ~WarSvrProtocolFtpDataConn(void);	virtual void StartTransfer(war_svrfile_ptr_t& filePtr);    virtual void OnTransferDone(const WarError& status);	virtual void OnReceived(const WarError& status,         war_transfer_buffer_ptr_t& buffer);    virtual void OnSent(const WarError& status,        war_transfer_buffer_ptr_t& buffer);      WarSvrProtocolFtp& mrServer;    private: };/* INLINE METHODS *//* EXTERNAL REFERENCES */typedef WarPtrWrapper<WarSvrProtocolFtpDataConn> war_datasck_ptr_t;#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif  /* WAR_SVR_PROTOCOL_FTP_DATA_CONN_H_ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?