1 #ifndef MAMMUT_COMMUNICATOR_TCP_HPP_
2 #define MAMMUT_COMMUNICATOR_TCP_HPP_
6 #include "./communicator.hpp"
14 class CommunicatorTcp:
public Communicator{
17 mutable utils::LockPthreadMutex _lock;
24 CommunicatorTcp(std::string serverAddress, uint16_t serverPort);
30 CommunicatorTcp(
const ServerTcp& serverTcp);
33 void send(
const char* message,
size_t messageLength)
const;
34 bool receive(
char* message,
size_t messageLength)
const;
35 utils::Lock& getLock()
const;
47 ServerTcp(uint16_t listeningPort);