summaryrefslogtreecommitdiff
path: root/toxcore/network.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-03-12 13:03:14 -0400
committerirungentoo <irungentoo@gmail.com>2015-03-12 13:03:14 -0400
commit7afab000f70c8a9d8070492fb42fb57bede4a75c (patch)
treea5f34d24974671659936151c4734eb275162ec9e /toxcore/network.h
parent4ee017078b1c8bbdf5f61b17194163768f3b0ad8 (diff)
tox_new now sets error to TOX_ERR_NEW_PORT_ALLOC when binding to port fails.
Diffstat (limited to 'toxcore/network.h')
-rw-r--r--toxcore/network.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/toxcore/network.h b/toxcore/network.h
index 0e7e5948..c67f523d 100644
--- a/toxcore/network.h
+++ b/toxcore/network.h
@@ -362,9 +362,11 @@ void networking_poll(Networking_Core *net);
362 * 362 *
363 * return Networking_Core object if no problems 363 * return Networking_Core object if no problems
364 * return NULL if there are problems. 364 * return NULL if there are problems.
365 *
366 * If error is non NULL it is set to 0 if no issues, 1 if bind failed, 2 if other.
365 */ 367 */
366Networking_Core *new_networking(IP ip, uint16_t port); 368Networking_Core *new_networking(IP ip, uint16_t port);
367Networking_Core *new_networking_ex(IP ip, uint16_t port_from, uint16_t port_to); 369Networking_Core *new_networking_ex(IP ip, uint16_t port_from, uint16_t port_to, unsigned int *error);
368 370
369/* Function to cleanup networking stuff (doesn't do much right now). */ 371/* Function to cleanup networking stuff (doesn't do much right now). */
370void kill_networking(Networking_Core *net); 372void kill_networking(Networking_Core *net);