14 Commits (424297cd5714c08b7916978376d211ec88a5cd24)

Author SHA1 Message Date
Georg Hopp 424297cd57 now when a constructor returns -1 the new call will in turn call the destructor effectively freeing all resources. ATTENTION: now the destructor has to be aware that it might be called with a not completely initialized object. To make this more ease there is the FREE makro with the corresponding ffree that does NULL pointer checking and the destructor checks for NULL pointer too. Additionally the handle_accept now handles _SC_OPEN_MAX - 10 connections. The 10 are reserved for internal usage. 14 years ago
Georg Hopp 7f688412ea some code cleanups...no changes in the logic 14 years ago
Georg Hopp b38d402250 start documenting this whole stuff...well at least add a copyright information in each file 14 years ago
Georg Hopp dfdfd20d8e now incomplete requests should no longer block the complete server. Tested with \'echo -en "GET / HTTP\r\nConn" | nc -w 600 localhost 11212\' and then doing requests from my browser. @TODO: cleanup those stuff, check if a not correctly response reading would block the server. 14 years ago
Georg Hopp dbb7042360 fixed the non keep-alive performance issue as well as i lower memory usage by using a single read and write circular buffer for every connection. @TODO: i noticed a server hang while getting large data (my image) with non keep-alive connections. Additionally an incomplete keep-alive request might stop the server now as the lock on the read buffer will not be released. 14 years ago
Georg Hopp f2dbad19c6 another try with a shared memory based ringbuffer...this performs well for keep-alive sessions but is much slower without. actually i am not sure why but most likely the shared memory setup is quite expensive. @TODO: make a profiling. 14 years ago
Georg Hopp e8a21ace31 lots of changes but primarily change the request parser to use a ringbuffer. The ringbuffer is implemented using the shared memory trick. 14 years ago
Georg Hopp 20af2baa6f separated the server completely from the http processing 14 years ago
Georg Hopp d87cd09ba1 more generalizing of response writing (implemented a response writer...now it should be possible to implement a stream writer for images 14 years ago
Georg Hopp e67667881f change response to tree based header storage and make everything work. 14 years ago
Georg Hopp 6c888a8c07 now only use keep-alive.... 14 years ago
Georg Hopp a4d09213ba moved request_parser.h and request_queue.h in separeate request subfolder 14 years ago
Georg Hopp 4a075de846 fix bug that arose in rewrite of header get and results in an ugly memory leak, as well as no headers would be found any more 14 years ago
Georg Hopp cb75a749e9 start split of request parser 14 years ago