/* Pure Load Balancer - (C)opyleft 2003 Jedi/Sector One */ #include #include "plb.h" #include "plb_globals.h" #ifdef WITH_DMALLOC # include #endif void client_read(const int evfd, short event, void * const client_) { Client * const client = client_; (void) evfd; if (handle_timeout(event, client) != 0) { return; } switch(client->state) { case STATE_HEADER: client_read_header(client); break; case STATE_SEND_HEADER: /* user probably clicked "STOP" */ client_disconnect(client); break; case STATE_IGNORE: break; case STATE_HEADER_SENT: client_forward_request(client); break; default: plb_log(LL_DEBUG, "*** UNHANDLED STATE ***"); client_disconnect(client); } }