Description
Migrate from the low-level libevent API to the higher-level eventbuffer API. This brings a number of advantages:
- Simplification of our connection management including buffer management. This includes the potential fewer copies of data to/from buffers to the underlying socket.
- Reduced syscalls - with libevent managing the TCP send buffers, it can coalesce multiple chunks of data to be sent out into a single sendmsg syscall etc.
- Simplification of TLS state machine handling - eventbuffer API has native support for TLS so we can simply delegate to that API and remove our own TLS statemachine.