summaryrefslogtreecommitdiff
path: root/src/ot_tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ot_tcp.h')
-rw-r--r--src/ot_tcp.h24
1 files changed, 24 insertions, 0 deletions
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 @@
1/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
2 It is considered beerware. Prost. Skol. Cheers or whatever. */
3
4#ifndef OT_TCP_H__
5#define OT_TCP_H__
6
7#include <stdint.h>
8
9#include "trackerlogic.h"
10
11/* Take whatever connections are waiting on a listening socket and answer
12 them, each on this thread's stack, handing a connection that cannot be
13 finished to the event loop */
14void tcp_accept(const int64_t serversocket, struct ot_workstruct *ws);
15
16/* Handler connections in the event loop has become readable or writable */
17void tcp_read(const int64_t sock, struct ot_workstruct *ws);
18void tcp_write(const int64_t sock);
19
20/* One thread accepting on one socket. Called once per worker. */
21void tcp_worker_install(int64_t sock);
22
23
24#endif