Using Poco C++ libraries, is quite easy to send an itpp::Mat object over a socket.
On the sender side:
itpp::Mat<short int>::Mat table("1 0 2; 0 1 0; 2 2 0"); std::string data(itpp::to_str(table)); socket().sendBytes(data.data(), (int)data.length());
At receiver side:
SocketAddress sa(HOST, PORT); StreamSocket sock(sa); SocketStream str(sock); std::string data; StreamCopier::copyToString(str, data); itpp::Mat<short int>::Mat received_table; std::istringstream ss(data); ss >> received_table;
Log in to post a comment.
Using Poco C++ libraries, is quite easy to send an itpp::Mat object over a
socket.
On the sender side:
At receiver side: