From ad541c67761b8aa6da1566802c347cac4018d0c2 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 2 Nov 2026 20:50:24 +0100 Subject: Move the build sources into src/ --- src/ot_tcp.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/ot_tcp.h (limited to 'src/ot_tcp.h') diff --git a/src/ot_tcp.h b/src/ot_tcp.h new file mode 100644 index 0000000..afed142 --- /dev/null +++ b/src/ot_tcp.h @@ -0,0 +1,24 @@ +/* This software was written by Dirk Engling + It is considered beerware. Prost. Skol. Cheers or whatever. */ + +#ifndef OT_TCP_H__ +#define OT_TCP_H__ + +#include + +#include "trackerlogic.h" + +/* Take whatever connections are waiting on a listening socket and answer + them, each on this thread's stack, handing a connection that cannot be + finished to the event loop */ +void tcp_accept(const int64_t serversocket, struct ot_workstruct *ws); + +/* Handler connections in the event loop has become readable or writable */ +void tcp_read(const int64_t sock, struct ot_workstruct *ws); +void tcp_write(const int64_t sock); + +/* One thread accepting on one socket. Called once per worker. */ +void tcp_worker_install(int64_t sock); + + +#endif -- cgit v1.3