/* This software was written by Dirk Engling It is considered beerware. Prost. Skol. Cheers or whatever. $id$ */ #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); /* Stop every worker installed above and wait for it to be gone */ void tcp_workers_deinit(void); #endif