otsdaq  v2_04_02
TCPServer.h
1 #ifndef _ots_TCPServer_h_
2 #define _ots_TCPServer_h_
3 
4 #include <string>
5 #include "otsdaq/NetworkUtilities/TCPServerBase.h"
6 
7 namespace ots
8 {
9 class TCPTransceiverSocket;
10 
11 class TCPServer : public TCPServerBase
12 {
13  public:
14  TCPServer(int serverPort, unsigned int maxNumberOfClients = -1);
15  virtual ~TCPServer(void);
16 
17  virtual std::string interpretMessage(const std::string& buffer) = 0;
18 
19  private:
20  void acceptConnections(void) override;
21  void connectClient(TCPTransceiverSocket* clientSocket);
22 };
23 }
24 
25 #endif