5 CLIENT_SETUP, /* setup stage: waiting for the initial byteorder/version data */
6 CLIENT_ACTIVE, /* main stage: accepting requests and sending events */
7 CLIENT_TEARDOWN /* TBD */
10 #define CLIENT_BUF_SIZE 256
14 int swap; /* true if we must byteswap all data to/from this client */
16 enum client_state state;
18 char inbuf[CLIENT_BUF_SIZE];
24 /* functions to manage the client list */
25 int add_client(int s);
26 int remove_client(int s);
27 int remove_closed(void);
29 struct client *find_client_sock(int s); /* find by socket */
30 struct client *get_clients(void);
32 void free_clients(void);
34 /* functions to handle client communictation */
35 int handle_client(struct client *c);
37 #endif /* CLIENT_H_ */