it seems client can only send message within a callback function like on_open(), because it requires "shared_ptrWssClient::Connection" from the on_open input parameter to make the "connection->send(send_stream);" action. But if in my application, the client side sometimes needs to initiate the message, something like this function:
void sendMsg(msg) {}
can the shared_ptrWssClient::Connection be made into a variable in the client class? or else how to do that? thanks.