25 #include <co/connection.h> 26 #include <co/dispatcher.h> 27 #include <co/nodeType.h> 68 CO_API
const NodeID& getNodeID()
const;
71 CO_API uint32_t getType()
const;
73 bool operator==(
const Node* n)
const;
76 CO_API
bool isReachable()
const;
79 CO_API
bool isConnected()
const;
82 CO_API
bool isListening()
const;
85 CO_API
bool isClosed()
const;
88 CO_API
bool isClosing()
const;
94 bool isLocal()
const {
return isListening(); }
126 CO_API
ConnectionPtr getConnection(
const bool multicast =
false);
143 CO_API
OCommand send(
const uint32_t cmd,
const bool multicast =
false);
161 const bool multicast =
false);
167 CO_API
void setHostname(
const std::string& host);
170 CO_API
const std::string& getHostname()
const;
173 CO_API
virtual std::string getWorkDir()
const;
176 CO_API
virtual std::string getLaunchQuote()
const;
180 CO_API int64_t getLastReceiveTime()
const;
189 CO_API
virtual ~Node();
212 detail::Node*
const _impl;
213 CO_API
friend std::ostream& operator<<(std::ostream&,
const Node&);
222 void _connectMulticast(
NodePtr node);
224 void _setListening();
229 void _setLastReceive(
const int64_t time);
234 CO_API std::ostream& operator<<(std::ostream& os,
const Node& node);
std::vector< ConnectionDescriptionPtr > ConnectionDescriptions
A vector of ConnectionDescriptionPtr's.
CO_API std::string serialize(const ConnectionDescriptions &)
Serialize a vector of connection descriptions to a string.
uint128_t NodeID
A unique identifier for nodes.
Proxy node representing a remote LocalNode.
A class for sending custom commands and data to nodes.
Object-oriented network library.
Node specialization for a local node.
A class for sending commands with data to local and external nodes.
lunchbox::RefPtr< ConnectionDescription > ConnectionDescriptionPtr
A reference pointer for ConnectionDescription pointers.
lunchbox::RefPtr< Connection > ConnectionPtr
A reference pointer for Connection pointers.
CO_API bool deserialize(std::string &data, ConnectionDescriptions &descriptions)
Deserialize a vector or connection descriptions from a string.
lunchbox::RefPtr< Node > NodePtr
A reference pointer for Node pointers.
A class providing command dispatch functionality to networked objects.