Rewrite ringbuffer
Try to increase so_sndbuf
Refactor client_close()
Refactor client read
Indent
Move all cleanup logic to channel_close