if i have a packet like so
i know how to send it, but how would i recieve it? since i dont know the size of the packet before i recv() it?Code:struct PACKET { unsigned char command; unsigned short length; char* message; };
if i have a packet like so
i know how to send it, but how would i recieve it? since i dont know the size of the packet before i recv() it?Code:struct PACKET { unsigned char command; unsigned short length; char* message; };
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.