DUNE: Uniform Navigational Environment  2016.05.0
Transports::FTP::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
 ~Task (void)
 
TCPSocket * createSocket (Address addr, uint16_t &port)
 
void onResourceAcquisition (void)
 
void onResourceRelease (void)
 
void acceptNewClient (TCPSocket *sock, const Address &local_addr)
 
void cleanBusyList (void)
 
void onMain (void)
 

Public Attributes

Arguments m_args
 
std::list< TCPSocket * > m_sockets
 
Poll m_poll
 
std::list< Session * > m_busy_list
 
Mutex m_busy_list_lock
 

Static Public Attributes

static const int c_port_retries
 

Constructor & Destructor Documentation

Transports::FTP::Task::Task ( const std::string &  name,
Tasks::Context &  ctx 
)
inline
Transports::FTP::Task::~Task ( void  )
inline

References onResourceRelease().

Member Function Documentation

void Transports::FTP::Task::acceptNewClient ( TCPSocket *  sock,
const Address &  local_addr 
)
inline
void Transports::FTP::Task::cleanBusyList ( void  )
inline

References m_busy_list.

Referenced by onMain().

TCPSocket* Transports::FTP::Task::createSocket ( Address  addr,
uint16_t &  port 
)
inline

Referenced by onResourceAcquisition().

void Transports::FTP::Task::onMain ( void  )
inline
void Transports::FTP::Task::onResourceAcquisition ( void  )
inline
void Transports::FTP::Task::onResourceRelease ( void  )
inline

Member Data Documentation

const int Transports::FTP::Task::c_port_retries
static

Port bind retries.

Arguments Transports::FTP::Task::m_args
std::list<Session*> Transports::FTP::Task::m_busy_list

List of busy sessions.

Referenced by acceptNewClient(), cleanBusyList(), and onResourceRelease().

Mutex Transports::FTP::Task::m_busy_list_lock

Concurrency lock for list of busy sessions.

Poll Transports::FTP::Task::m_poll

I/O selector.

Referenced by onMain(), and onResourceAcquisition().

std::list<TCPSocket*> Transports::FTP::Task::m_sockets
Collaboration diagram for Transports::FTP::Task:
Collaboration graph