diff options
author | isotoxin <isotoxin.dev@yandex.ru> | 2016-09-03 21:26:45 +0300 |
---|---|---|
committer | isotoxin <isotoxin.dev@yandex.ru> | 2016-09-03 21:26:45 +0300 |
commit | 2c989d992ce77086f7acb70ceb95bae58378ca1d (patch) | |
tree | ee5c26b17bd1a83dffebc7967fd0eb2a2c97c885 /toxcore/TCP_server.h | |
parent | 33edad85827a296ace58bef119a4b112ca718f8a (diff) |
Rearrange fields to decrease size of structure
Diffstat (limited to 'toxcore/TCP_server.h')
-rw-r--r-- | toxcore/TCP_server.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/TCP_server.h b/toxcore/TCP_server.h index 908916ef..f5768594 100644 --- a/toxcore/TCP_server.h +++ b/toxcore/TCP_server.h | |||
@@ -89,7 +89,6 @@ struct TCP_Priority_List { | |||
89 | }; | 89 | }; |
90 | 90 | ||
91 | typedef struct TCP_Secure_Connection { | 91 | typedef struct TCP_Secure_Connection { |
92 | uint8_t status; | ||
93 | sock_t sock; | 92 | sock_t sock; |
94 | uint8_t public_key[crypto_box_PUBLICKEYBYTES]; | 93 | uint8_t public_key[crypto_box_PUBLICKEYBYTES]; |
95 | uint8_t recv_nonce[crypto_box_NONCEBYTES]; /* Nonce of received packets. */ | 94 | uint8_t recv_nonce[crypto_box_NONCEBYTES]; /* Nonce of received packets. */ |
@@ -97,12 +96,13 @@ typedef struct TCP_Secure_Connection { | |||
97 | uint8_t shared_key[crypto_box_BEFORENMBYTES]; | 96 | uint8_t shared_key[crypto_box_BEFORENMBYTES]; |
98 | uint16_t next_packet_length; | 97 | uint16_t next_packet_length; |
99 | struct { | 98 | struct { |
100 | uint8_t status; /* 0 if not used, 1 if other is offline, 2 if other is online. */ | ||
101 | uint8_t public_key[crypto_box_PUBLICKEYBYTES]; | 99 | uint8_t public_key[crypto_box_PUBLICKEYBYTES]; |
102 | uint32_t index; | 100 | uint32_t index; |
101 | uint8_t status; /* 0 if not used, 1 if other is offline, 2 if other is online. */ | ||
103 | uint8_t other_id; | 102 | uint8_t other_id; |
104 | } connections[NUM_CLIENT_CONNECTIONS]; | 103 | } connections[NUM_CLIENT_CONNECTIONS]; |
105 | uint8_t last_packet[2 + MAX_PACKET_SIZE]; | 104 | uint8_t last_packet[2 + MAX_PACKET_SIZE]; |
105 | uint8_t status; | ||
106 | uint16_t last_packet_length; | 106 | uint16_t last_packet_length; |
107 | uint16_t last_packet_sent; | 107 | uint16_t last_packet_sent; |
108 | 108 | ||