summaryrefslogtreecommitdiff
path: root/ot_tcp.h
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-31 01:24:18 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-10-31 01:24:18 +0100
commit440cfeee71829308fa1cc9b5aef63beb7ab756dc (patch)
tree27f8ca155a4d0b71a5a3b2bb089b83cde6eb7017 /ot_tcp.h
parent9a2d71c69518a0448940b8873051ac3a2ee37999 (diff)
Refactor all tcp specific code into the ot_tcp module to prepare for multiple concurrent workersHEADmaster
Diffstat (limited to 'ot_tcp.h')
-rw-r--r--ot_tcp.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/ot_tcp.h b/ot_tcp.h
new file mode 100644
index 0000000..b0a93f4
--- /dev/null
+++ b/ot_tcp.h
@@ -0,0 +1,22 @@
1/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
2 It is considered beerware. Prost. Skol. Cheers or whatever.
3
4 $id$ */
5
6#ifndef OT_TCP_H__
7#define OT_TCP_H__
8
9#include <stdint.h>
10
11#include "trackerlogic.h"
12
13/* Take whatever connections are waiting on a listening socket and answer
14 them, each on this thread's stack, handing a connection that cannot be
15 finished to the event loop */
16void tcp_accept(const int64_t serversocket, struct ot_workstruct *ws);
17
18/* Handler connections in the event loop has become readable or writable */
19void tcp_read(const int64_t sock, struct ot_workstruct *ws);
20void tcp_write(const int64_t sock);
21
22#endif