A simple event-driven TCP connection framework