I'd prefer this to stay as it was. Each time a new socket connects to the server the handler was re-used instead of creating 3 new callbacks each time.