summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.h
diff options
context:
space:
mode:
authormichael bishop <cleverca22@gmail.com>2016-09-09 10:30:35 -0300
committermichael bishop <cleverca22@gmail.com>2016-09-10 01:09:37 -0300
commit05f474b4df8171412237f46c943822edd202b4a9 (patch)
tree7cf886de28682fe5d4c40de034c9ebfae75d3eae /toxcore/net_crypto.h
parent406d292107f66a06f8db695645345b13ae8acc8b (diff)
make the majority of the callbacks stateless and add some status to a testcase
Diffstat (limited to 'toxcore/net_crypto.h')
-rw-r--r--toxcore/net_crypto.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h
index c5eb3ecb..e676b864 100644
--- a/toxcore/net_crypto.h
+++ b/toxcore/net_crypto.h
@@ -139,7 +139,7 @@ typedef struct {
139 void *connection_data_callback_object; 139 void *connection_data_callback_object;
140 int connection_data_callback_id; 140 int connection_data_callback_id;
141 141
142 int (*connection_lossy_data_callback)(void *object, int id, const uint8_t *data, uint16_t length); 142 int (*connection_lossy_data_callback)(void *object, int id, const uint8_t *data, uint16_t length, void *userdata);
143 void *connection_lossy_data_callback_object; 143 void *connection_lossy_data_callback_object;
144 int connection_lossy_data_callback_id; 144 int connection_lossy_data_callback_id;
145 145
@@ -287,7 +287,8 @@ int connection_data_handler(const Net_Crypto *c, int crypt_connection_id, int (*
287 * return 0 on success. 287 * return 0 on success.
288 */ 288 */
289int connection_lossy_data_handler(Net_Crypto *c, int crypt_connection_id, 289int connection_lossy_data_handler(Net_Crypto *c, int crypt_connection_id,
290 int (*connection_lossy_data_callback)(void *object, int id, const uint8_t *data, uint16_t length), void *object, 290 int (*connection_lossy_data_callback)(void *object, int id, const uint8_t *data, uint16_t length, void *userdata),
291 void *object,
291 int id); 292 int id);
292 293
293/* Set the function for this friend that will be callbacked with object and number if 294/* Set the function for this friend that will be callbacked with object and number if