otsdaq  v2_05_02_indev
ots::TCPServerBase Class Referenceabstract
Inheritance diagram for ots::TCPServerBase:
ots::TCPSocket ots::TCPPublishServer ots::TCPServer

Public Member Functions

 TCPServerBase (int serverPort, unsigned int maxNumberOfClients)
 
void startAccept (void)
 
void broadcastPacket (const char *message, std::size_t length)
 
void broadcastPacket (const std::string &message)
 
void broadcast (const char *message, std::size_t length)
 
void broadcast (const std::string &message)
 
void broadcast (const std::vector< char > &message)
 
void broadcast (const std::vector< uint16_t > &message)
 
- Public Member Functions inherited from ots::TCPSocket
 TCPSocket (int socketId=invalidSocketId)
 
 TCPSocket (TCPSocket &&move)
 
TCPSocketoperator= (TCPSocket &&move)
 
void swap (TCPSocket &other)
 
 TCPSocket (TCPSocket const &)=delete
 
TCPSocketoperator= (TCPSocket const &)=delete
 
int getSocketId (void) const
 
void open (void)
 
void close (void)
 
void sendClose (void)
 

Protected Member Functions

virtual void acceptConnections ()=0
 
void closeClientSocket (int socket)
 
template<class T >
T * acceptClient (bool blocking=true)
 

Protected Attributes

std::promise< bool > fAcceptPromise
 
std::map< int, TCPSocket * > fConnectedClients
 
const int E_SHUTDOWN = 0
 

Additional Inherited Members

- Static Protected Attributes inherited from ots::TCPSocket
static constexpr int invalidSocketId = -1
 

Detailed Description

Definition at line 12 of file TCPServerBase.h.


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