WebSocket-based instant communication protocol and framework