Standards-compliant WebSocket client and server