#include <FtpClient.h>

Inheritance diagram for Ftp::CtrlChannel:
Collaboration diagram for Ftp::CtrlChannel:

Public Member Functions

 CtrlChannel ()
 
 ~CtrlChannel ()
 
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

char * buf
 
size_t size
 
size_t offset
 
wordlistmessage
 
char * last_command
 
char * last_reply
 
int replycode
 
Comm::ConnectionPointer conn
 channel descriptor More...
 
Comm::ConnectionPointer listenConn
 

Private Member Functions

 CtrlChannel (const CtrlChannel &)
 
CtrlChanneloperator= (const CtrlChannel &)
 

Private Attributes

AsyncCall::Pointer closer
 Comm close handler callback. More...
 

Detailed Description

FTP channel for control commands. This channel is opened once per transaction.

Definition at line 73 of file FtpClient.h.

Constructor & Destructor Documentation

◆ CtrlChannel() [1/2]

Ftp::CtrlChannel::CtrlChannel ( )

Definition at line 134 of file FtpClient.cc.

References buf, memAllocBuf(), and size.

◆ ~CtrlChannel()

Ftp::CtrlChannel::~CtrlChannel ( )

Definition at line 146 of file FtpClient.cc.

References memFreeBuf(), safe_free, size, and wordlistDestroy().

◆ CtrlChannel() [2/2]

Ftp::CtrlChannel::CtrlChannel ( const CtrlChannel )
private

Member Function Documentation

◆ clear()

void Ftp::Channel::clear ( )
inherited

just drops conn and close handler. does not close active connections.

Definition at line 126 of file FtpClient.cc.

References conn, and NULL.

Referenced by ftpOpenListenSocket().

◆ close()

void Ftp::Channel::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 105 of file FtpClient.cc.

References comm_remove_close_handler(), conn, and Comm::IsConnOpen().

Referenced by ftpOpenListenSocket().

◆ forget()

void Ftp::Channel::forget ( )
inherited

◆ opened()

void Ftp::Channel::opened ( const Comm::ConnectionPointer conn,
const AsyncCall::Pointer aCloser 
)
inherited

configures the channel with a descriptor and registers a close handler

Definition at line 88 of file FtpClient.cc.

References assert, comm_add_close_handler(), conn, Comm::IsConnOpen(), and NULL.

Referenced by Ftp::Client::Client().

◆ operator=()

CtrlChannel& Ftp::CtrlChannel::operator= ( const CtrlChannel )
private

Member Data Documentation

◆ buf

char* Ftp::CtrlChannel::buf

Definition at line 79 of file FtpClient.h.

Referenced by CtrlChannel().

◆ closer

AsyncCall::Pointer Ftp::Channel::closer
privateinherited

Definition at line 68 of file FtpClient.h.

◆ conn

Comm::ConnectionPointer Ftp::Channel::conn
inherited

◆ last_command

char* Ftp::CtrlChannel::last_command

Definition at line 83 of file FtpClient.h.

Referenced by Ftp::Client::Client(), and ftpSendReply().

◆ last_reply

char* Ftp::CtrlChannel::last_reply

Definition at line 84 of file FtpClient.h.

Referenced by ftpReadMdtm(), ftpReadSize(), and ftpSendReply().

◆ listenConn

Comm::ConnectionPointer Ftp::Channel::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().

◆ message

wordlist* Ftp::CtrlChannel::message

Definition at line 82 of file FtpClient.h.

Referenced by ftpReadCwd(), ftpReadEPSV(), and ftpReadWelcome().

◆ offset

size_t Ftp::CtrlChannel::offset

Definition at line 81 of file FtpClient.h.

◆ replycode

◆ size

size_t Ftp::CtrlChannel::size

Definition at line 80 of file FtpClient.h.

Referenced by CtrlChannel().


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors