mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
move client data struct to header file
This commit is contained in:
parent
e9f15d3879
commit
93b34ef9e3
11
core/DHT.c
11
core/DHT.c
|
@ -63,17 +63,6 @@
|
|||
|
||||
/*----------------------------------------------------------------------------------*/
|
||||
|
||||
typedef struct {
|
||||
uint8_t client_id[CLIENT_ID_SIZE];
|
||||
IP_Port ip_port;
|
||||
uint64_t timestamp;
|
||||
uint64_t last_pinged;
|
||||
|
||||
/* Returned by this node. Either our friend or us */
|
||||
IP_Port ret_ip_port;
|
||||
uint64_t ret_timestamp;
|
||||
} Client_data;
|
||||
|
||||
typedef struct {
|
||||
uint8_t client_id[CLIENT_ID_SIZE];
|
||||
Client_data client_list[MAX_FRIEND_CLIENTS];
|
||||
|
|
11
core/DHT.h
11
core/DHT.h
|
@ -34,6 +34,17 @@ extern "C" {
|
|||
/* size of the client_id in bytes */
|
||||
#define CLIENT_ID_SIZE crypto_box_PUBLICKEYBYTES
|
||||
|
||||
typedef struct {
|
||||
uint8_t client_id[CLIENT_ID_SIZE];
|
||||
IP_Port ip_port;
|
||||
uint64_t timestamp;
|
||||
uint64_t last_pinged;
|
||||
|
||||
/* Returned by this node. Either our friend or us */
|
||||
IP_Port ret_ip_port;
|
||||
uint64_t ret_timestamp;
|
||||
} Client_data;
|
||||
|
||||
/* Add a new friend to the friends list
|
||||
client_id must be CLIENT_ID_SIZE bytes long.
|
||||
returns 0 if success
|
||||
|
|
Loading…
Reference in New Issue
Block a user