summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/net_crypto.h')
-rw-r--r--toxcore/net_crypto.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h
index 030cc678..e5dfcae0 100644
--- a/toxcore/net_crypto.h
+++ b/toxcore/net_crypto.h
@@ -139,6 +139,12 @@ int write_cryptpacket(Net_Crypto *c, int crypt_connection_id, uint8_t *data, uin
139int create_request(uint8_t *send_public_key, uint8_t *send_secret_key, uint8_t *packet, uint8_t *recv_public_key, 139int create_request(uint8_t *send_public_key, uint8_t *send_secret_key, uint8_t *packet, uint8_t *recv_public_key,
140 uint8_t *data, uint32_t length, uint8_t request_id); 140 uint8_t *data, uint32_t length, uint8_t request_id);
141 141
142/* puts the senders public key in the request in public_key, the data from the request
143 in data if a friend or ping request was sent to us and returns the length of the data.
144 packet is the request packet and length is its length
145 return -1 if not valid request. */
146int handle_request(uint8_t *self_public_key, uint8_t *self_secret_key, uint8_t *public_key, uint8_t *data,
147 uint8_t *request_id, uint8_t *packet, uint16_t length);
142 148
143/* Function to call when request beginning with byte is received. */ 149/* Function to call when request beginning with byte is received. */
144void cryptopacket_registerhandler(Net_Crypto *c, uint8_t byte, cryptopacket_handler_callback cb, void *object); 150void cryptopacket_registerhandler(Net_Crypto *c, uint8_t byte, cryptopacket_handler_callback cb, void *object);