diff options
Diffstat (limited to 'ot_tcp.h')
| -rw-r--r-- | ot_tcp.h | 22 |
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 */ | ||
| 16 | void tcp_accept(const int64_t serversocket, struct ot_workstruct *ws); | ||
| 17 | |||
| 18 | /* Handler connections in the event loop has become readable or writable */ | ||
| 19 | void tcp_read(const int64_t sock, struct ot_workstruct *ws); | ||
| 20 | void tcp_write(const int64_t sock); | ||
| 21 | |||
| 22 | #endif | ||
