if i have a packet like so...
how would i go about recieving it, since the size can be anywhere from 3bytes - ???bytes?Code:struct PACKET
{
unsigned char message;
unsigned short length;
char* message;
}
I think to send it i would go (havent tested it because i dont know how to recieve it yet.)
Code:PACKET* pack = new PACKET;
...
pack->length = strlen(pack->message);
...
send(socket, pack, pack->length + 3, 0);
Any Ideas?