Node stat function.

This commit is contained in:
Nicolás Ortega Froysa 2017-11-08 02:00:33 +01:00
parent 3e15f1dc8a
commit 5e816cf601
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF
2 changed files with 11 additions and 0 deletions

View File

@ -105,6 +105,13 @@ int NeoComm_import_nodes(const char *node_file);
*/
int NeoComm_export_nodes(const char *node_file);
/**
* @brief Retrieve statistics about the local node.
*
* @return A text description of the local node's status.
*/
const char *NeoComm_get_node_stats();
/**
* @brief Join a channel.
*

View File

@ -112,3 +112,7 @@ int NeoComm_export_nodes(const char *node_file) {
msgpack::pack(export_file, node.exportNodes());
return 1;
}
const char *NeoComm_get_node_stats() {
return node.getNodesStats(AF_UNSPEC).toString().c_str();
}