Improved WebSocket class for C++ target