Improve WebSocket adapter.