summaryrefslogtreecommitdiff
path: root/toxcore/network.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2016-08-17 10:52:04 +0100
committeriphydf <iphydf@users.noreply.github.com>2016-08-18 00:01:53 +0100
commita5e35180c7b42d30c82825cd67c8118ce048f65a (patch)
treeb74e8ece4f78a988ab0a1300cc08bd35fcd63662 /toxcore/network.h
parentdb22522741cccdeba657776844538c71cf8e8e7a (diff)
Make tox_callback_friend_name stateless.
See #27 and #40 for details.
Diffstat (limited to 'toxcore/network.h')
-rw-r--r--toxcore/network.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/toxcore/network.h b/toxcore/network.h
index 8d2ccfce..97927299 100644
--- a/toxcore/network.h
+++ b/toxcore/network.h
@@ -290,7 +290,8 @@ int addr_resolve_or_parse_ip(const char *address, IP *to, IP *extra);
290 * Packet data is put into data. 290 * Packet data is put into data.
291 * Packet length is put into length. 291 * Packet length is put into length.
292 */ 292 */
293typedef int (*packet_handler_callback)(void *object, IP_Port ip_port, const uint8_t *data, uint16_t len); 293typedef int (*packet_handler_callback)(void *object, IP_Port ip_port, const uint8_t *data, uint16_t len,
294 void *userdata);
294 295
295typedef struct { 296typedef struct {
296 packet_handler_callback function; 297 packet_handler_callback function;
@@ -364,7 +365,7 @@ int sendpacket(Networking_Core *net, IP_Port ip_port, const uint8_t *data, uint1
364void networking_registerhandler(Networking_Core *net, uint8_t byte, packet_handler_callback cb, void *object); 365void networking_registerhandler(Networking_Core *net, uint8_t byte, packet_handler_callback cb, void *object);
365 366
366/* Call this several times a second. */ 367/* Call this several times a second. */
367void networking_poll(Networking_Core *net); 368void networking_poll(Networking_Core *net, void *userdata);
368 369
369/* Initialize networking. 370/* Initialize networking.
370 * bind to ip and port. 371 * bind to ip and port.