tdaq-develop-2025-02-12
Return to top level
TCPServer.h
1
#ifndef _ots_TCPServer_h_
2
#define _ots_TCPServer_h_
3
4
#include <iostream>
5
#include <string>
6
#include "otsdaq/NetworkUtilities/TCPServerBase.h"
7
8
namespace
ots
9
{
10
class
TCPTransceiverSocket;
11
12
class
TCPServer
:
public
TCPServerBase
13
{
14
public
:
15
TCPServer
(
unsigned
int
serverPort,
unsigned
int
maxNumberOfClients = -1);
16
virtual
~
TCPServer
(
void
);
17
18
virtual
std::string interpretMessage(
const
std::string& buffer) = 0;
19
void
setReceiveTimeout(
unsigned
int
timeoutSeconds,
unsigned
int
timeoutMicroseconds);
20
void
setSendTimeout(
unsigned
int
timeoutSeconds,
unsigned
int
timeoutMicroseconds);
21
22
private
:
23
void
acceptConnections(
void
)
override
;
24
void
connectClient(
TCPTransceiverSocket
* clientSocket);
25
struct
timeval fReceiveTimeout;
26
struct
timeval fSendTimeout;
27
bool
fInDestructor;
28
};
29
}
// namespace ots
30
31
#endif
ots::TCPServerBase
Definition:
TCPServerBase.h:15
ots::TCPServer
Definition:
TCPServer.h:13
ots::TCPTransceiverSocket
A class that can read/write to a socket.
Definition:
TCPTransceiverSocket.h:11
ots
Definition:
ArtdaqOtsBuildInfo_module.cc:10
otsdaq
otsdaq
NetworkUtilities
TCPServer.h
Generated on Mon Feb 17 2025 17:02:11 for tdaq-develop-2025-02-12 by
1.9.1