otsdaq
v2_05_02_indev
Return to top level
Main Page
Classes
Files
File List
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
void
setReceiveTimeout(
unsigned
int
timeoutSeconds,
unsigned
int
timeoutMicroseconds);
19
void
setSendTimeout(
unsigned
int
timeoutSeconds,
unsigned
int
timeoutMicroseconds);
20
21
private
:
22
void
acceptConnections(
void
)
override
;
23
void
connectClient(
TCPTransceiverSocket
* clientSocket);
24
struct
timeval fReceiveTimeout;
25
struct
timeval fSendTimeout;
26
};
27
}
28
29
#endif
ots::TCPServer
Definition:
TCPServer.h:11
ots::TCPTransceiverSocket
Definition:
TCPTransceiverSocket.h:10
ots::TCPServerBase
Definition:
TCPServerBase.h:12
otsdaq
otsdaq
NetworkUtilities
TCPServer.h
Generated on Wed Apr 29 2020 18:41:48 for otsdaq by
1.8.5