summaryrefslogtreecommitdiff
path: root/protocols/Tox/libtox/src/toxcore/TCP_server.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-07-24 16:44:24 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-07-24 16:44:24 +0300
commite55d071e5485a937efd427d159b76c208cccdcce (patch)
tree48d09dc5cf1df2581fd6471b5ccf1560015fa3a4 /protocols/Tox/libtox/src/toxcore/TCP_server.h
parentf36629f67153bc500c828cf51de31988122a1024 (diff)
fixes #3118 (Update toxcore to 0.2.18)
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/TCP_server.h')
-rw-r--r--protocols/Tox/libtox/src/toxcore/TCP_server.h20
1 files changed, 12 insertions, 8 deletions
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);