Good Day,
I have an image object in C++ generated via openCV. It's a Mat object, and I want to be able to send this object in raw byte format over a udp socket. The size of this object is about 200Kb. I have to do this for multiple objects
I am going to assume that this is a very bad idea:
Mat frame, edges;
..socket opening code..
write(sockfd,&frame,sizeof(frame));
I am guessing the correct way to do it, is to have one thread say write the Mat object to some buffer array, and another thread deques it and then writes to the socket object by object. I would like some opinions on this.