summaryrefslogtreecommitdiff
path: root/toxcore/TCP_server.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-03-14 14:12:35 -0400
committerirungentoo <irungentoo@gmail.com>2014-03-14 14:12:35 -0400
commit3acf43b76accbe0285e9cec0ff3536efeb3f8d8c (patch)
tree0a3337614f8eb7cb686305835dc7f0a4de7c9cb0 /toxcore/TCP_server.h
parent29afa26396feb109966e507481022e884aaad09f (diff)
A bit of work done on the TCP relay server.
Diffstat (limited to 'toxcore/TCP_server.h')
-rw-r--r--toxcore/TCP_server.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/toxcore/TCP_server.h b/toxcore/TCP_server.h
index 573108af..89ccb50f 100644
--- a/toxcore/TCP_server.h
+++ b/toxcore/TCP_server.h
@@ -22,11 +22,11 @@
22 22
23#include "net_crypto.h" 23#include "net_crypto.h"
24 24
25#define TCP_MAX_BACKLOG 128 25#define MAX_INCOMMING_CONNECTIONS 32
26 26
27#define MAX_PACKET_SIZE 8192 27#define TCP_MAX_BACKLOG MAX_INCOMMING_CONNECTIONS
28 28
29#define MAX_INCOMMING_CONNECTIONS 32 29#define MAX_PACKET_SIZE 8192
30 30
31#define TCP_HANDSHAKE_PLAIN_SIZE (crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES) 31#define TCP_HANDSHAKE_PLAIN_SIZE (crypto_box_PUBLICKEYBYTES + crypto_box_NONCEBYTES)
32#define TCP_SERVER_HANDSHAKE_SIZE (crypto_box_NONCEBYTES + TCP_HANDSHAKE_PLAIN_SIZE + crypto_box_MACBYTES) 32#define TCP_SERVER_HANDSHAKE_SIZE (crypto_box_NONCEBYTES + TCP_HANDSHAKE_PLAIN_SIZE + crypto_box_MACBYTES)
@@ -57,6 +57,8 @@ typedef struct {
57 uint8_t secret_key[crypto_box_SECRETKEYBYTES]; 57 uint8_t secret_key[crypto_box_SECRETKEYBYTES];
58 TCP_Secure_Connection incomming_connection_queue[MAX_INCOMMING_CONNECTIONS]; 58 TCP_Secure_Connection incomming_connection_queue[MAX_INCOMMING_CONNECTIONS];
59 uint16_t incomming_connection_queue_index; 59 uint16_t incomming_connection_queue_index;
60 TCP_Secure_Connection unconfirmed_connection_queue[MAX_INCOMMING_CONNECTIONS];
61 uint16_t unconfirmed_connection_queue_index;
60} TCP_Server; 62} TCP_Server;
61 63
62/* Create new TCP server instance. 64/* Create new TCP server instance.