Refactored onWebSocket to consider the possibility of a websocket handshake.
Refactored onWebSocket to consider the possibility of a websocket handshake.

kapouer/engine.io,nkzawa/engine.io,CantemoInternal/engine.io,socketio/engine.io,socketio/engine.io