diff options
Diffstat (limited to 'toxcore/TCP_connection.h')
-rw-r--r-- | toxcore/TCP_connection.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/toxcore/TCP_connection.h b/toxcore/TCP_connection.h index 140d6de3..7bc34f86 100644 --- a/toxcore/TCP_connection.h +++ b/toxcore/TCP_connection.h | |||
@@ -165,6 +165,8 @@ void set_oob_packet_tcp_connection_callback(TCP_Connections *tcp_c, int (*tcp_oo | |||
165 | 165 | ||
166 | /* Create a new TCP connection to public_key. | 166 | /* Create a new TCP connection to public_key. |
167 | * | 167 | * |
168 | * public_key must be the counterpart to the secret key that the other peer used with new_tcp_connections(). | ||
169 | * | ||
168 | * id is the id in the callbacks for that connection. | 170 | * id is the id in the callbacks for that connection. |
169 | * | 171 | * |
170 | * return connections_number on success. | 172 | * return connections_number on success. |
@@ -206,6 +208,8 @@ int add_tcp_number_relay_connection(TCP_Connections *tcp_c, int connections_numb | |||
206 | 208 | ||
207 | /* Add a TCP relay tied to a connection. | 209 | /* Add a TCP relay tied to a connection. |
208 | * | 210 | * |
211 | * This should be called with the same relay by two peers who want to create a TCP connection with each other. | ||
212 | * | ||
209 | * return 0 on success. | 213 | * return 0 on success. |
210 | * return -1 on failure. | 214 | * return -1 on failure. |
211 | */ | 215 | */ |
@@ -226,7 +230,15 @@ int add_tcp_relay_global(TCP_Connections *tcp_c, IP_Port ip_port, const uint8_t | |||
226 | */ | 230 | */ |
227 | unsigned int tcp_copy_connected_relays(TCP_Connections *tcp_c, Node_format *tcp_relays, uint16_t max_num); | 231 | unsigned int tcp_copy_connected_relays(TCP_Connections *tcp_c, Node_format *tcp_relays, uint16_t max_num); |
228 | 232 | ||
233 | /* Returns a new TCP_Connections object associated with the secret_key. | ||
234 | * | ||
235 | * In order for others to connect to this instance new_tcp_connection_to() must be called with the | ||
236 | * public_key associated with secret_key. | ||
237 | * | ||
238 | * Returns NULL on failure. | ||
239 | */ | ||
229 | TCP_Connections *new_tcp_connections(const uint8_t *secret_key, TCP_Proxy_Info *proxy_info); | 240 | TCP_Connections *new_tcp_connections(const uint8_t *secret_key, TCP_Proxy_Info *proxy_info); |
241 | |||
230 | void do_tcp_connections(TCP_Connections *tcp_c); | 242 | void do_tcp_connections(TCP_Connections *tcp_c); |
231 | void kill_tcp_connections(TCP_Connections *tcp_c); | 243 | void kill_tcp_connections(TCP_Connections *tcp_c); |
232 | 244 | ||