mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Rearrange fields to decrease size of structure
This commit is contained in:
parent
33edad8582
commit
2c989d992c
|
@ -89,7 +89,6 @@ struct TCP_Priority_List {
|
|||
};
|
||||
|
||||
typedef struct TCP_Secure_Connection {
|
||||
uint8_t status;
|
||||
sock_t sock;
|
||||
uint8_t public_key[crypto_box_PUBLICKEYBYTES];
|
||||
uint8_t recv_nonce[crypto_box_NONCEBYTES]; /* Nonce of received packets. */
|
||||
|
@ -97,12 +96,13 @@ typedef struct TCP_Secure_Connection {
|
|||
uint8_t shared_key[crypto_box_BEFORENMBYTES];
|
||||
uint16_t next_packet_length;
|
||||
struct {
|
||||
uint8_t status; /* 0 if not used, 1 if other is offline, 2 if other is online. */
|
||||
uint8_t public_key[crypto_box_PUBLICKEYBYTES];
|
||||
uint32_t index;
|
||||
uint8_t status; /* 0 if not used, 1 if other is offline, 2 if other is online. */
|
||||
uint8_t other_id;
|
||||
} connections[NUM_CLIENT_CONNECTIONS];
|
||||
uint8_t last_packet[2 + MAX_PACKET_SIZE];
|
||||
uint8_t status;
|
||||
uint16_t last_packet_length;
|
||||
uint16_t last_packet_sent;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user