diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-08-17 10:52:04 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-08-18 00:01:53 +0100 |
commit | a5e35180c7b42d30c82825cd67c8118ce048f65a (patch) | |
tree | b74e8ece4f78a988ab0a1300cc08bd35fcd63662 /toxcore/network.h | |
parent | db22522741cccdeba657776844538c71cf8e8e7a (diff) |
Make tox_callback_friend_name stateless.
See #27 and #40 for details.
Diffstat (limited to 'toxcore/network.h')
-rw-r--r-- | toxcore/network.h | 5 |
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 | */ |
293 | typedef int (*packet_handler_callback)(void *object, IP_Port ip_port, const uint8_t *data, uint16_t len); | 293 | typedef int (*packet_handler_callback)(void *object, IP_Port ip_port, const uint8_t *data, uint16_t len, |
294 | void *userdata); | ||
294 | 295 | ||
295 | typedef struct { | 296 | typedef 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 | |||
364 | void networking_registerhandler(Networking_Core *net, uint8_t byte, packet_handler_callback cb, void *object); | 365 | void 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. */ |
367 | void networking_poll(Networking_Core *net); | 368 | void 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. |