microsoft / cpprestsdk

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Other
7.91k stars 1.64k forks source link

receive json data to websocket #1738

Open JHyunCau opened 1 year ago

JHyunCau commented 1 year ago

Hi, I'm facing an error that occurs when I reveivce json data on websocket. The error is 'trace/breakpoint trap (core dumped)'. Could I get json data to websocket??

client.set_message_handler([](websocket_incoming_message in_msg){ cout << "receiving message" << endl; json::value in_obj = json::value::parse(conversions::to_string_t(in_msg.extract_string().get())); json::value seq = in_obj[U("sequence")] });