summaryrefslogtreecommitdiff
path: root/ot_tcp.h
blob: b0a93f4007937f3c669720986730d5435d2c481f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* This software was written by Dirk Engling <erdgeist@erdgeist.org>
   It is considered beerware. Prost. Skol. Cheers or whatever.

   $id$ */

#ifndef OT_TCP_H__
#define OT_TCP_H__

#include <stdint.h>

#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);

#endif