I want to transfer image data on websocket by using boost library.
How should I resolve below error?
At first, I confirmed to be able to transfer and receive text data by referring following URL. https://www.boost.org/doc/libs/1_68_0/libs/beast/doc/html/beast/quick_start.html
And next, although I tried to transfer image, I got following error message.
websocket_client.cpp:563:38: error: no matching function for call to 'buffer(cv::Mat&)'
ws.write(boost::asio::buffer(img));
What I did are below.
read image file as 'img' by using opencv.
Change the code for transfer data
// Send the message // ws.write(boost::asio::buffer(std::string(text))); ws.write(boost::asio::buffer(img));