summaryrefslogtreecommitdiff
path: root/toxcore/TCP_connection.h
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2016-09-21 20:23:46 +0100
committeriphydf <iphydf@users.noreply.github.com>2016-09-22 16:42:36 +0100
commit18b298a3d690d0691e7002977ba83b3965f78510 (patch)
tree343d6369ce797bd94630fc8222cb1ab3eaab8e23 /toxcore/TCP_connection.h
parentfd50660f407bf3457c4c5ae943c3978aa6054bba (diff)
Make TCP_Connections module-private.
Diffstat (limited to 'toxcore/TCP_connection.h')
-rw-r--r--toxcore/TCP_connection.h28
1 files changed, 2 insertions, 26 deletions
diff --git a/toxcore/TCP_connection.h b/toxcore/TCP_connection.h
index edf9ec8f..e87196f0 100644
--- a/toxcore/TCP_connection.h
+++ b/toxcore/TCP_connection.h
@@ -78,33 +78,9 @@ typedef struct {
78 bool unsleep; /* set to 1 to unsleep connection. */ 78 bool unsleep; /* set to 1 to unsleep connection. */
79} TCP_con; 79} TCP_con;
80 80
81typedef struct { 81typedef struct TCP_Connections TCP_Connections;
82 DHT *dht;
83
84 uint8_t self_public_key[crypto_box_PUBLICKEYBYTES];
85 uint8_t self_secret_key[crypto_box_SECRETKEYBYTES];
86
87 TCP_Connection_to *connections;
88 uint32_t connections_length; /* Length of connections array. */
89
90 TCP_con *tcp_connections;
91 uint32_t tcp_connections_length; /* Length of tcp_connections array. */
92
93 int (*tcp_data_callback)(void *object, int id, const uint8_t *data, uint16_t length, void *userdata);
94 void *tcp_data_callback_object;
95
96 int (*tcp_oob_callback)(void *object, const uint8_t *public_key, unsigned int tcp_connections_number,
97 const uint8_t *data, uint16_t length, void *userdata);
98 void *tcp_oob_callback_object;
99
100 int (*tcp_onion_callback)(void *object, const uint8_t *data, uint16_t length, void *userdata);
101 void *tcp_onion_callback_object;
102
103 TCP_Proxy_Info proxy_info;
104 82
105 bool onion_status; 83const uint8_t *tcp_connections_public_key(const TCP_Connections *tcp_c);
106 uint16_t onion_num_conns;
107} TCP_Connections;
108 84
109/* Send a packet to the TCP connection. 85/* Send a packet to the TCP connection.
110 * 86 *