22 #ifndef __M2ETIS_WRAPPER_CLOCKTCPWRAPPER_H__
23 #define __M2ETIS_WRAPPER_CLOCKTCPWRAPPER_H__
30 #include "boost/make_shared.hpp"
31 #include "boost/thread/mutex.hpp"
54 clockTcpWrapper(
const std::string & listenIP,
const uint16_t listenPort,
const std::string & connectIP,
const uint16_t connectPort);
74 throw std::runtime_error(
"clockTCPWrapper: not initialized. call init() first!");
80 node->
port_ = _local.getPort();
105 std::map<net::NetworkType<net::clockTCP>::Key, clockUtils::sockets::TcpSocket *> _sockets;
110 void readFromSocket(clockUtils::sockets::TcpSocket * oldSocket);
115 boost::mutex _mapLock;
120 std::multimap<uint32_t, boost::thread *> _threads;
NodeHandle in different structured p2p-systems.
void registerMessageType(const message::MessageType type, const bool ack) const
Doesn't do anything right now.
~clockTcpWrapper()
closes socket and all its connections
clockTcpWrapper(const std::string &listenIP, const uint16_t listenPort, const std::string &connectIP, const uint16_t connectPort)
starts a TcpSocket connection listening
void send(const message::NetworkMessage< net::NetworkType< net::clockTCP >>::Ptr msg, net::NodeHandle< net::NetworkType< net::clockTCP >>::Ptr_const hint)
sends a message
net::NodeHandle< net::NetworkType< net::clockTCP > >::Ptr getSelfNodeHandle() const
returns pointer with data
creates connections using clockUtils' TcpSocket