25 #include <co/dispatcher.h> 26 #include <co/connection.h> 27 #include <co/nodeType.h> 32 namespace detail {
class Node; }
65 CO_API
const NodeID& getNodeID()
const;
68 CO_API uint32_t getType()
const;
70 bool operator == (
const Node* n )
const;
71 bool isBigEndian()
const;
74 CO_API
bool isReachable()
const;
77 CO_API
bool isConnected()
const;
80 CO_API
bool isListening()
const;
83 CO_API
bool isClosed()
const;
86 CO_API
bool isClosing()
const;
92 bool isLocal()
const {
return isListening(); }
125 CO_API
ConnectionPtr getConnection(
const bool multicast =
false );
142 CO_API
OCommand send(
const uint32_t cmd,
const bool multicast =
false);
160 const bool multicast =
false );
166 CO_API
void setHostname(
const std::string& host );
169 CO_API
const std::string& getHostname()
const;
172 CO_API
virtual std::string getWorkDir()
const;
175 CO_API
virtual std::string getLaunchQuote()
const;
179 CO_API int64_t getLastReceiveTime()
const;
188 CO_API
virtual ~Node();
211 detail::Node*
const _impl;
212 CO_API
friend std::ostream& operator << ( std::ostream&,
const Node& );
221 void _connectMulticast(
NodePtr node );
223 void _setListening();
228 void _setLastReceive(
const int64_t time );
233 CO_API std::ostream& operator << ( std::ostream& os,
const Node& node );
238 template<>
inline void byteswap(
co::Node*& ) { }
239 template<>
inline void byteswap(
co::NodePtr& ) { }
CO_API std::string serialize(const ConnectionDescriptions &)
Serialize a vector of connection descriptions to a string.
lunchbox::RefPtr< ConnectionDescription > ConnectionDescriptionPtr
A reference pointer for ConnectionDescription pointers.
uint128_t NodeID
A unique identifier for nodes.
Proxy node representing a remote LocalNode.
A class for sending custom commands and data to nodes.
lunchbox::RefPtr< Node > NodePtr
A reference pointer for Node pointers.
Object-oriented network library.
Node specialization for a local node.
std::vector< ConnectionDescriptionPtr > ConnectionDescriptions
A vector of ConnectionDescriptionPtr's.
A class for sending commands with data to local and external nodes.
CO_API bool deserialize(std::string &data, ConnectionDescriptions &descriptions)
Deserialize a vector or connection descriptions from a string.
A class providing command dispatch functionality to networked objects.
lunchbox::RefPtr< Connection > ConnectionPtr
A reference pointer for Connection pointers.