I'm working on a remoting control program. I need to send and receive multiple data at once. I use this solution:
struct PACKET
{
int x;
int y;
};
//...
PACKET p;
p.x = 10;
p.y = 5;
send(socket, (char*)&p, sizeof(PACKET), 0);
However, I'm considering if this is a safe way to do so. Should I find another solution?