8#ifndef _B2ARICH_TCPSocket_hh_
9#define _B2ARICH_TCPSocket_hh_
13#include "daq/slc/system/FileDescriptor.h"
27 TCPSocket(
const std::string& ip,
unsigned short port)
28 : m_ip(ip), m_port(port) {}
35 void setIP(
const std::string& ip) { m_ip = ip; }
36 void setPort(
unsigned short port) { m_port = port; }
37 const std::string& getIP()
const {
return m_ip; }
38 unsigned short getPort()
const {
return m_port; }
40 int connect(
const std::string& ip,
unsigned short port);
41 void setBufferSize(
int size);
43 const std::string getLocalIP();
44 int getLocalAddress();
46 unsigned int getAddress();
49 virtual size_t write(
const void* v,
size_t count);
50 virtual size_t read(
void* v,
size_t count);
51 size_t read_once(
void* v,
size_t count);
55 unsigned short m_port;
Abstract base class for different kinds of events.