An event-driven state machine for routing sockets.