Pass socket to handler

A socket is now passed to handler function along with the request, allowing the handler to send a response via the same connection