Connect may give error.

This commit is contained in:
Nicolás Ortega Froysa
2017-09-20 21:01:07 +02:00
parent 485e38ed80
commit 3eb8a5e887
2 changed files with 29 additions and 3 deletions

View File

@ -40,8 +40,11 @@ void NeoComm_deinit();
*
* @param address DNS/IP of the node.
* @param port Port of the foreign node.
*
* @return 1 upon success, 0 upon failure. Use NeoComm_get_last_error for a
* text description of the error.
*/
void NeoComm_connect(const char *address, const unsigned short port);
int NeoComm_connect(const char *address, const unsigned short port);
/**
* @brief Import a list of nodes from a node file and connect to them.
@ -73,6 +76,13 @@ int NeoComm_export_nodes(const char *node_file);
*/
int NeoComm_join_channel(const char *channel_name);
/**
* @brief Leave a channel.
*
* @param channel_name Name of the channel to disconnect from.
*/
void NeoComm_leave_channel(const char *channel_name);
/**
* @brief Get the last error that occurred in text.
*