DUNE: Uniform Navigational Environment  2016.09.0
Transports::TCP::Server::Task Struct Reference

Classes

struct  Client
 

Public Types

typedef std::list< ClientClientList
 

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
 ~Task (void)
 
void onResourceAcquisition (void)
 
void updateEntityState (unsigned client_count)
 
void closeConnection (Client &c, std::exception &e)
 
void onResourceRelease (void)
 
void onDataTransmission (const uint8_t *p, unsigned int n)
 
void onDataReception (uint8_t *buf, unsigned int cap, double timeout)
 
void acceptNewClient (void)
 
void handleClients (uint8_t *buf, unsigned int cap)
 

Public Attributes

Arguments m_args
 
TCPSocket * m_sock
 
Poll m_poll
 
ClientList m_clients
 

Static Public Attributes

static const int c_port_retries
 

Member Typedef Documentation

Constructor & Destructor Documentation

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

References onResourceRelease().

Member Function Documentation

void Transports::TCP::Server::Task::closeConnection ( Client c,
std::exception &  e 
)
inline
void Transports::TCP::Server::Task::handleClients ( uint8_t *  buf,
unsigned int  cap 
)
inline

References closeConnection(), m_clients, and m_poll.

Referenced by onDataReception().

void Transports::TCP::Server::Task::onDataReception ( uint8_t *  buf,
unsigned int  cap,
double  timeout 
)
inline
void Transports::TCP::Server::Task::onDataTransmission ( const uint8_t *  p,
unsigned int  n 
)
inline

References closeConnection(), and m_clients.

void Transports::TCP::Server::Task::onResourceAcquisition ( void  )
inline
void Transports::TCP::Server::Task::onResourceRelease ( void  )
inline

References m_clients, m_poll, and m_sock.

Referenced by ~Task().

void Transports::TCP::Server::Task::updateEntityState ( unsigned  client_count)
inline

Member Data Documentation

const int Transports::TCP::Server::Task::c_port_retries
static

Referenced by onResourceAcquisition().

Arguments Transports::TCP::Server::Task::m_args

Referenced by onResourceAcquisition(), and Task().

ClientList Transports::TCP::Server::Task::m_clients
Poll Transports::TCP::Server::Task::m_poll
TCPSocket* Transports::TCP::Server::Task::m_sock
Collaboration diagram for Transports::TCP::Server::Task:
Collaboration graph