working on server

This commit is contained in:
2014-08-18 19:11:04 +01:00
parent a7feac05e6
commit d6cb6aa3ea
16 changed files with 287 additions and 35 deletions

32
src/server-loop.h Normal file
View File

@@ -0,0 +1,32 @@
/*
* File: server-loop.h
* Author: sam
*
* Created on 18 August 2014, 17:16
*/
#ifndef SERVER_LOOP_H
#define SERVER_LOOP_H
#ifdef __cplusplus
extern "C" {
#endif
#include "server-state.h"
#define EP_CONN(event) (server_connection*)event->data.ptr
#define EP_EVENT_IS(event, type) ((event->events & type) == type)
#define EP_EVENT_ISNOT(event, type) (!EVENT_IS(event, type))
void server_loop(server_status *state);
void* server_loop_read(void* arg);
void* server_loop_write(void* arg);
void* server_loop_worker(void* arg);
#ifdef __cplusplus
}
#endif
#endif /* SERVER_LOOP_H */