More compliant websocket implementation.