25 #include <co/dispatcher.h>
26 #include <co/connection.h>
27 #include <co/nodeType.h>
32 namespace detail {
class Node; }
69 CO_API uint32_t
getType()
const;
71 bool operator == (
const Node* n )
const;
72 bool isBigEndian()
const;
144 CO_API
OCommand send(
const uint32_t cmd,
const bool multicast =
false);
162 const bool multicast =
false );
166 CO_API int64_t getLastReceiveTime()
const;
169 CO_API std::string serialize()
const;
171 CO_API
bool deserialize( std::string& data );
175 CO_API
virtual ~Node();
198 detail::Node*
const _impl;
199 CO_API
friend std::ostream& operator << ( std::ostream&,
const Node& );
208 void _connectMulticast(
NodePtr node );
210 void _setListening();
215 void _setLastReceive(
const int64_t time );
220 CO_API std::ostream& operator << ( std::ostream& os,
const Node& node );
225 template<>
inline void byteswap(
co::Node*& ) { }
CO_API bool removeConnectionDescription(ConnectionDescriptionPtr cd)
Removes a connection description.
virtual CO_API ~Node()
Destruct this node.
CO_API bool isConnected() const
CO_API bool isClosed() const
CO_API uint32_t getType() const
A class for sending commands with data to local and external nodes.
A class providing command dispatch functionality to networked objects.
UUID NodeID
A unique identifier for nodes.
lunchbox::RefPtr< ConnectionDescription > ConnectionDescriptionPtr
A reference pointer for ConnectionDescription pointers.
Node specialization for a local node.
CO_API ConnectionPtr getConnection(const bool multicast=false)
Get an active connection to this node.
CO_API bool isListening() const
Proxy node representing a remote LocalNode.
CO_API const NodeID & getNodeID() const
Get the node's unique identifier.
CO_API bool isClosing() const
lunchbox::RefPtr< Node > NodePtr
A reference pointer for Node pointers.
A class for sending custom commands and data to nodes.
CO_API void addConnectionDescription(ConnectionDescriptionPtr cd)
Add a new description how this node can be reached.
CO_API Node(const uint32_t type=co::NODETYPE_NODE)
Construct a new node proxy.
CO_API OCommand send(const uint32_t cmd, const bool multicast=false)
Send a command with optional data to the node.
ConnectionPtr getMulticast()
Activate and return a multicast connection.
CO_API bool isReachable() const
std::vector< ConnectionDescriptionPtr > ConnectionDescriptions
A vector of ConnectionDescriptionPtr's.
CO_API ConnectionDescriptions getConnectionDescriptions() const
lunchbox::RefPtr< Connection > ConnectionPtr
A reference pointer for Connection pointers.