diff options
Diffstat (limited to 'toxcore')
-rw-r--r-- | toxcore/net_crypto.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h index 4a1d7f2c..61a97e53 100644 --- a/toxcore/net_crypto.h +++ b/toxcore/net_crypto.h | |||
@@ -58,9 +58,9 @@ | |||
58 | 58 | ||
59 | /** Messages. **/ | 59 | /** Messages. **/ |
60 | 60 | ||
61 | #define PACKET_ID_PADDING 0 /* Denotes padding */ | 61 | #define PACKET_ID_PADDING 0 // Denotes padding |
62 | #define PACKET_ID_REQUEST 1 /* Used to request unreceived packets */ | 62 | #define PACKET_ID_REQUEST 1 // Used to request unreceived packets |
63 | #define PACKET_ID_KILL 2 /* Used to kill connection */ | 63 | #define PACKET_ID_KILL 2 // Used to kill connection |
64 | 64 | ||
65 | #define PACKET_ID_ONLINE 24 | 65 | #define PACKET_ID_ONLINE 24 |
66 | #define PACKET_ID_OFFLINE 25 | 66 | #define PACKET_ID_OFFLINE 25 |
@@ -69,8 +69,8 @@ | |||
69 | #define PACKET_ID_USERSTATUS 50 | 69 | #define PACKET_ID_USERSTATUS 50 |
70 | #define PACKET_ID_TYPING 51 | 70 | #define PACKET_ID_TYPING 51 |
71 | #define PACKET_ID_MESSAGE 64 | 71 | #define PACKET_ID_MESSAGE 64 |
72 | #define PACKET_ID_ACTION 65 /* PACKET_ID_MESSAGE + MESSAGE_ACTION */ | 72 | #define PACKET_ID_ACTION 65 // PACKET_ID_MESSAGE + MESSAGE_ACTION |
73 | #define PACKET_ID_MSI 69 /* Used by AV to setup calls and etc */ | 73 | #define PACKET_ID_MSI 69 // Used by AV to setup calls and etc |
74 | #define PACKET_ID_FILE_SENDREQUEST 80 | 74 | #define PACKET_ID_FILE_SENDREQUEST 80 |
75 | #define PACKET_ID_FILE_CONTROL 81 | 75 | #define PACKET_ID_FILE_CONTROL 81 |
76 | #define PACKET_ID_FILE_DATA 82 | 76 | #define PACKET_ID_FILE_DATA 82 |
@@ -91,7 +91,7 @@ typedef enum Crypto_Conn_State { | |||
91 | } Crypto_Conn_State; | 91 | } Crypto_Conn_State; |
92 | 92 | ||
93 | /* Maximum size of receiving and sending packet buffers. */ | 93 | /* Maximum size of receiving and sending packet buffers. */ |
94 | #define CRYPTO_PACKET_BUFFER_SIZE 32768 /* Must be a power of 2 */ | 94 | #define CRYPTO_PACKET_BUFFER_SIZE 32768 // Must be a power of 2 |
95 | 95 | ||
96 | /* Minimum packet rate per second. */ | 96 | /* Minimum packet rate per second. */ |
97 | #define CRYPTO_PACKET_MIN_RATE 4.0 | 97 | #define CRYPTO_PACKET_MIN_RATE 4.0 |
@@ -120,7 +120,8 @@ typedef enum Crypto_Conn_State { | |||
120 | #define MAX_TCP_CONNECTIONS 64 | 120 | #define MAX_TCP_CONNECTIONS 64 |
121 | #define MAX_TCP_RELAYS_PEER 4 | 121 | #define MAX_TCP_RELAYS_PEER 4 |
122 | 122 | ||
123 | #define CRYPTO_MAX_PADDING 8 /* All packets will be padded a number of bytes based on this number. */ | 123 | /* All packets will be padded a number of bytes based on this number. */ |
124 | #define CRYPTO_MAX_PADDING 8 | ||
124 | 125 | ||
125 | /* Base current transfer speed on last CONGESTION_QUEUE_ARRAY_SIZE number of points taken | 126 | /* Base current transfer speed on last CONGESTION_QUEUE_ARRAY_SIZE number of points taken |
126 | at the dT defined in net_crypto.c */ | 127 | at the dT defined in net_crypto.c */ |