From e55d071e5485a937efd427d159b76c208cccdcce Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 24 Jul 2022 16:44:24 +0300 Subject: fixes #3118 (Update toxcore to 0.2.18) --- protocols/Tox/libtox/src/toxcore/TCP_server.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'protocols/Tox/libtox/src/toxcore/TCP_server.h') diff --git a/protocols/Tox/libtox/src/toxcore/TCP_server.h b/protocols/Tox/libtox/src/toxcore/TCP_server.h index 3269ed3b0a..2224938a09 100644 --- a/protocols/Tox/libtox/src/toxcore/TCP_server.h +++ b/protocols/Tox/libtox/src/toxcore/TCP_server.h @@ -10,6 +10,7 @@ #define C_TOXCORE_TOXCORE_TCP_SERVER_H #include "crypto_core.h" +#include "forwarding.h" #include "onion.h" #define MAX_INCOMING_CONNECTIONS 256 @@ -27,20 +28,23 @@ typedef enum TCP_Status { typedef struct TCP_Server TCP_Server; +non_null() const uint8_t *tcp_server_public_key(const TCP_Server *tcp_server); +non_null() size_t tcp_server_listen_count(const TCP_Server *tcp_server); -/** Create new TCP server instance. - */ -TCP_Server *new_TCP_server(const Logger *logger, uint8_t ipv6_enabled, uint16_t num_sockets, const uint16_t *ports, - const uint8_t *secret_key, Onion *onion); +/** Create new TCP server instance. */ +non_null(1, 2, 3, 6, 7) nullable(8, 9) +TCP_Server *new_TCP_server(const Logger *logger, const Random *rng, const Network *ns, + bool ipv6_enabled, uint16_t num_sockets, const uint16_t *ports, + const uint8_t *secret_key, Onion *onion, Forwarding *forwarding); -/** Run the TCP_server - */ +/** Run the TCP_server */ +non_null() void do_TCP_server(TCP_Server *tcp_server, const Mono_Time *mono_time); -/** Kill the TCP server - */ +/** Kill the TCP server */ +nullable(1) void kill_TCP_server(TCP_Server *tcp_server); -- cgit v1.2.3