1 #ifndef EUDAQ_INCLUDED_TransportTCP
2 #define EUDAQ_INCLUDED_TransportTCP
4 #include "eudaq/TransportFactory.hh"
6 #include "eudaq/Platform.hh"
8 #if EUDAQ_PLATFORM_IS(WIN32) || EUDAQ_PLATFORM_IS(MINGW)
14 #include <sys/select.h>
27 : m_fd(fd), m_len(0), m_buf(
""){ m_host=host;}
28 void append(
size_t length,
const char *data);
29 bool havepacket()
const;
30 std::string getpacket();
31 SOCKET GetFd()
const {
return m_fd; }
38 virtual void Print(std::ostream &)
const;
39 virtual std::string GetRemote()
const {
return m_host; }
45 void update_length(
bool =
false);
57 virtual void SendPacket(
const unsigned char *data,
size_t len,
59 bool duringconnect =
false);
62 virtual std::string ConnectionString()
const;
63 static const std::string name;
81 virtual void SendPacket(
const unsigned char *data,
size_t len,
87 void OpenConnection();
95 #endif // EUDAQ_INCLUDED_TransportTCP
virtual void ProcessEvents(int timeout)
Definition: TransportTCP.cc:421
virtual void ProcessEvents(int timeout=-1)
Definition: TransportTCP.cc:590
Definition: TransportTCP.hh:76
virtual void SendPacket(const unsigned char *data, size_t len, const ConnectionInfo &id=ConnectionInfo::ALL, bool=false)
Definition: TransportTCP.cc:580
virtual void Close(const ConnectionInfo &id)
Definition: TransportTCP.cc:390
Definition: TransportTCP.hh:51
Definition: TransportServer.hh:10
Definition: TransportBase.hh:22
Definition: TransportClient.hh:9
virtual void SendPacket(const unsigned char *data, size_t len, const ConnectionInfo &id=ConnectionInfo::ALL, bool duringconnect=false)
Definition: TransportTCP.cc:405
Definition: TransportTCP.hh:24