Ftp::DataChannel Class Reference

#include <FtpClient.h>

Inheritance diagram for Ftp::DataChannel:
Collaboration diagram for Ftp::DataChannel:

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

MemBufreadBuf
 
char * host
 
unsigned short port
 
bool read_pending
 
Comm::ConnectionPointer conn
 channel descriptor More...
 
Comm::ConnectionPointer listenConn
 
AsyncCall::Pointer opener
 Comm opener handler callback. More...
 

Detailed Description

FTP channel for data exchanges. This channel may be opened/closed a few times.

Definition at line 76 of file FtpClient.h.

Constructor & Destructor Documentation

◆ DataChannel()

Ftp::DataChannel::DataChannel ( )

Definition at line 139 of file FtpClient.cc.

◆ ~DataChannel()

Ftp::DataChannel::~DataChannel ( )

Definition at line 147 of file FtpClient.cc.

References readBuf.

Member Function Documentation

◆ addr()

void Ftp::DataChannel::addr ( const Ip::Address addr)

◆ clear()

void Ftp::Channel::clear ( )
inherited

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

Definition at line 108 of file FtpClient.cc.

References conn, and NULL.

Referenced by Ftp::Client::ctrlClosed(), Ftp::Client::dataClosed(), Ftp::Gateway::ftpAcceptDataConnection(), and 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 87 of file FtpClient.cc.

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

Referenced by Ftp::Client::closeServer(), Ftp::Client::dataComplete(), Ftp::Gateway::ftpAcceptDataConnection(), ftpOpenListenSocket(), Ftp::Client::sendPassive(), Ftp::Relay::serverComplete(), Ftp::Gateway::timeout(), and Ftp::Client::~Client().

◆ forget()

void Ftp::Channel::forget ( )
inherited

◆ opened()

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

Member Data Documentation

◆ conn

◆ host

char* Ftp::DataChannel::host

Definition at line 86 of file FtpClient.h.

Referenced by addr(), Ftp::Client::connectDataChannel(), and ftpOpenListenSocket().

◆ 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 46 of file FtpClient.h.

Referenced by Ftp::Client::dataClosed(), Ftp::Gateway::ftpAcceptDataConnection(), ftpReadPORT(), and ftpSendPORT().

◆ opener

◆ port

unsigned short Ftp::DataChannel::port

Definition at line 87 of file FtpClient.h.

Referenced by addr(), and Ftp::Client::connectDataChannel().

◆ read_pending

bool Ftp::DataChannel::read_pending

Definition at line 88 of file FtpClient.h.

Referenced by Ftp::Client::dataRead(), and Ftp::Client::maybeReadVirginBody().

◆ readBuf


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors