Portability Libraries  2015.2.0.0
Common Methods and Objects for Platform Independance.
SoftwareAndServices::Library::Common::TcpServer Class Reference

#include "<SaS/Common/TcpServer.hpp>"

+ Inheritance diagram for SoftwareAndServices::Library::Common::TcpServer:
+ Collaboration diagram for SoftwareAndServices::Library::Common::TcpServer:

Public Member Functions

 TcpServer (Poll *pollPtr)
 
virtual ~TcpServer ()
 
int AddPort (uint16_t port)
 
int AddPort (const char *serviceName)
 
pthread_t AddService (const char *serviceName)
 
void Close (uint16_t Port=0)
 
int GetAcceptFd (uint16_t Port) const
 
unsigned long GetCurrentFdMax () const
 
Poll::PollFunc_t GetDefaultAcceptCb () const
 
unsigned long GetMaxFd () const
 
unsigned int GetMaxThreads () const
 
bool GetPeerAddr (uint16_t Port, struct sockaddr_storage &Results, socklen_t &AddrLen) const
 
const struct sockaddr_storage * GetServerAddr (uint16_t port) const
 
void * GetUserData () const
 
PollPollFromFd (const int fd) const
 
bool Secure (const char *Private, const char *Public)
 
pthread_t Server (const short port)
 
pthread_t Server (const char *serviceName)
 
void SetAcceptFd (const int sockfd, uint16_t Port)
 
void SetListenQSize (const unsigned int TheQSize)
 
void SetMaxFd (const unsigned long TheFdMax)
 
void SetMaxThreads (const unsigned int maxThreads)
 
void SetUserData (const void *data)
 
- Public Member Functions inherited from SoftwareAndServices::Library::Common::instance< TcpServer >
 instance ()
 
virtual InstanceCount_t decInstance () const
 
virtual InstanceCount_t getInstance () const
 
virtual InstanceCount_t incInstance () const
 
void operator delete (void *ToFree)
 

Friends

void * newServerThread (void *ptr)
 
void * PollThread (void *ptr)
 
int TcpServerAcceptCb (const int TheFd, const unsigned short Events, Poll::CallBacks *Cb, const unsigned int xx, const char *UserData)
 

Detailed Description

Implementation of a generic TCP server.

Definition at line 159 of file TcpServer.hpp.


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