m2etis  0.4
m2etis::wrapper::clocktcp::clockTcpWrapper Class Reference

creates connections using clockUtils' TcpSocket More...

#include <clockTcpWrapper.h>

Inheritance diagram for m2etis::wrapper::clocktcp::clockTcpWrapper:
Inheritance graph

Public Member Functions

 clockTcpWrapper (const std::string &listenIP, const uint16_t listenPort, const std::string &connectIP, const uint16_t connectPort)
 starts a TcpSocket connection listening More...
 
 ~clockTcpWrapper ()
 closes socket and all its connections More...
 
void send (const message::NetworkMessage< net::NetworkType< net::clockTCP >>::Ptr msg, net::NodeHandle< net::NetworkType< net::clockTCP >>::Ptr_const hint)
 sends a message More...
 
net::NodeHandle< net::NetworkType< net::clockTCP > >::Ptr getSelfNodeHandle () const
 returns pointer with data More...
 
void registerMessageType (const message::MessageType type, const bool ack) const
 Doesn't do anything right now. More...
 
- Public Member Functions inherited from m2etis::net::NetworkInterface< net::NetworkType< net::clockTCP > >
virtual ~NetworkInterface ()
 
void setCallback (NetworkCallbackInterface< net::NetworkType< net::clockTCP > > *cb)
 Sets the callback-object on which the defined callbacks will be called. More...
 
virtual void send (const typename message::NetworkMessage< net::NetworkType< net::clockTCP > >::Ptr msg, typename NodeHandle< net::NetworkType< net::clockTCP > >::Ptr_const hint)=0
 Sends a message to the node which is responsible for the given key. Provide a hint for better routing. More...
 
virtual void registerMessageType (const typename net::NetworkType< net::clockTCP >::MessageType type, const bool ack) const =0
 register a messagetype. Only registered types are sent. More...
 

Additional Inherited Members

- Protected Attributes inherited from m2etis::net::NetworkInterface< net::NetworkType< net::clockTCP > >
net::NetworkCallbackInterface< net::NetworkType< net::clockTCP > > * _callback
 returns an array of count neighbor nodes with priority to closer nodes. More...
 

Detailed Description

creates connections using clockUtils' TcpSocket

Definition at line 49 of file clockTcpWrapper.h.

Constructor & Destructor Documentation

m2etis::wrapper::clocktcp::clockTcpWrapper::clockTcpWrapper ( const std::string &  listenIP,
const uint16_t  listenPort,
const std::string &  connectIP,
const uint16_t  connectPort 
)

starts a TcpSocket connection listening

m2etis::wrapper::clocktcp::clockTcpWrapper::~clockTcpWrapper ( )

closes socket and all its connections

Member Function Documentation

net::NodeHandle<net::NetworkType<net::clockTCP> >::Ptr m2etis::wrapper::clocktcp::clockTcpWrapper::getSelfNodeHandle ( ) const
inlinevirtual

returns pointer with data

Returns
data contains _name, _port and key from (_name:_port)

Implements m2etis::net::NetworkInterface< net::NetworkType< net::clockTCP > >.

Definition at line 72 of file clockTcpWrapper.h.

void m2etis::wrapper::clocktcp::clockTcpWrapper::registerMessageType ( const message::MessageType  type,
const bool  ack 
) const

Doesn't do anything right now.

void m2etis::wrapper::clocktcp::clockTcpWrapper::send ( const message::NetworkMessage< net::NetworkType< net::clockTCP >>::Ptr  msg,
net::NodeHandle< net::NetworkType< net::clockTCP >>::Ptr_const  hint 
)

sends a message

Parameters
[in]msgMessage to be sent
[in]hintA hint on the next hop to be used (not used in this wrapper)

The documentation for this class was generated from the following file: