consider using a bufferpool for server operations
A bufferpool would make it easier to read requests as it would save on malloc()
, realloc()
and free()
calls. Currently if the server reads a request on every byte it reads the buffer is realloc()
'd and free()
'd at the end. This is a massive overhead and should be easily solved with a bufferpool