#include <FtpClient.h>
Public Member Functions | |
DataChannel () | |
~DataChannel () | |
void | addr (const Ip::Address &addr) |
import host and port More... | |
void | opened (const Comm::ConnectionPointer &conn, const AsyncCall::Pointer &aCloser) |
called after the socket is opened, sets up close handler More... | |
void | close () |
planned close: removes the close handler and calls comm_close More... | |
void | forget () |
void | clear () |
remove the close handler, leave connection open More... | |
Public Attributes | |
MemBuf * | readBuf |
char * | host |
unsigned short | port |
bool | read_pending |
Comm::ConnectionPointer | conn |
channel descriptor More... | |
Comm::ConnectionPointer | listenConn |
Private Attributes | |
AsyncCall::Pointer | closer |
Comm close handler callback. More... | |
Detailed Description
FTP channel for data exchanges. This channel may be opened/closed a few times.
Definition at line 94 of file FtpClient.h.
Constructor & Destructor Documentation
◆ DataChannel()
Ftp::DataChannel::DataChannel | ( | ) |
Definition at line 159 of file FtpClient.cc.
◆ ~DataChannel()
Ftp::DataChannel::~DataChannel | ( | ) |
Definition at line 167 of file FtpClient.cc.
Member Function Documentation
◆ addr()
void Ftp::DataChannel::addr | ( | const Ip::Address & | addr | ) |
Definition at line 173 of file FtpClient.cc.
References MAX_IPSTRLEN, port, xfree, and xstrdup.
◆ clear()
|
inherited |
just drops conn and close handler. does not close active connections.
Definition at line 128 of file FtpClient.cc.
References conn.
Referenced by ftpOpenListenSocket().
◆ close()
|
inherited |
Handles all operations needed to properly close the active channel FD. clearing the close handler, clearing the listen socket properly, and calling comm_close
Definition at line 107 of file FtpClient.cc.
References comm_remove_close_handler(), conn, and Comm::IsConnOpen().
Referenced by ftpOpenListenSocket().
◆ forget()
|
inherited |
Definition at line 118 of file FtpClient.cc.
References comm_remove_close_handler(), commUnsetConnTimeout(), conn, and Comm::IsConnOpen().
◆ opened()
|
inherited |
configures the channel with a descriptor and registers a close handler
Definition at line 90 of file FtpClient.cc.
References assert, comm_add_close_handler(), conn, and Comm::IsConnOpen().
Referenced by Ftp::Client::Client().
Member Data Documentation
◆ closer
|
privateinherited |
Definition at line 68 of file FtpClient.h.
◆ conn
|
inherited |
Definition at line 58 of file FtpClient.h.
Referenced by ftpOpenListenSocket(), ftpReadList(), ftpReadRetr(), and Ftp::Relay::HandleStoreAbort().
◆ host
char* Ftp::DataChannel::host |
Definition at line 104 of file FtpClient.h.
Referenced by ftpOpenListenSocket().
◆ listenConn
|
inherited |
A temporary handle to the connection being listened on. Closing this will also close the waiting Data channel acceptor. If a data connection has already been accepted but is still waiting in the event queue the callback will still happen and needs to be handled (usually dropped).
Definition at line 65 of file FtpClient.h.
Referenced by ftpSendPORT().
◆ port
unsigned short Ftp::DataChannel::port |
Definition at line 105 of file FtpClient.h.
◆ read_pending
bool Ftp::DataChannel::read_pending |
Definition at line 106 of file FtpClient.h.
◆ readBuf
MemBuf* Ftp::DataChannel::readBuf |
Definition at line 103 of file FtpClient.h.
The documentation for this class was generated from the following files:
- src/clients/FtpClient.h
- src/clients/FtpClient.cc