Add logger middleware to connect example
Generalize socket handling for http.IncomingMessage