Closed wbehrens-on-gh closed 2 years ago
I'm not sure about your code but I found one problem.
msgpack::object msg = msgpack::unpack(msg_data.data(), msg_data.size()).get();
should be
msgpack::object_handle oh = msgpack::unpack(msg_data.data(), msg_data.size());
msgpack::object msg = oh.get();
because msgpack::object
is a reference type.
See https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_object
repo
I'm trying to encode a
cv::Mat
to a jpeg then serialize it using msgpack so I can send it over a UDP network using Poco datagram sockets client:server:
The problem I'm having is that once the client connects to the server and sends the first packet I imediately get
and the server dies, from what I've found that error should only happen if I'm trying to decode the message as the wrong type but I can't get why that would be?