Belle II Software
development
TCPServerSocket.h
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
#ifndef _B2ARICH_TCPServerSocket_hh_
9
#define _B2ARICH_TCPServerSocket_hh_
10
11
#include "daq/slc/system/TCPSocket.h"
12
#include "daq/slc/system/FileDescriptor.h"
13
14
namespace
Belle2
{
20
class
TCPServerSocket
:
public
FileDescriptor
{
21
22
public
:
23
TCPServerSocket
()
24
: m_ip(
""
), m_port(0) {}
25
TCPServerSocket
(
const
std::string& ip,
unsigned
short
port)
26
: m_ip(ip), m_port(port) {}
27
virtual
~TCPServerSocket
() {}
28
29
public
:
30
void
setIP(
const
std::string& ip) { m_ip = ip; }
31
void
setPort(
unsigned
short
port) { m_port = port; }
32
const
std::string& getIP()
const
{
return
m_ip; }
33
unsigned
short
getPort()
const
{
return
m_port; }
34
int
open(
int
nqueue = 5);
35
int
open(
const
std::string& ip,
unsigned
short
port,
int
nqueue = 5);
36
TCPSocket
accept();
37
38
private
:
39
std::string m_ip;
40
unsigned
short
m_port;
41
42
};
43
45
}
46
47
#endif
48
Belle2::FileDescriptor
Definition:
FileDescriptor.h:17
Belle2::TCPServerSocket
Definition:
TCPServerSocket.h:20
Belle2::TCPSocket
Definition:
TCPSocket.h:21
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
daq
slc
system
include
TCPServerSocket.h
Generated on Fri Nov 8 2024 02:35:50 for Belle II Software by
1.9.6