I\'m sending a C struct over UDP
struct packet{ int numInt; int* intList; //malloc\'ed as (sizeof(int)*numInt) }
It will be seriali
You could try using a small buffer, just large enough to get numInt, with the MSG_PEEK flag set. Then you can find out the size you actually need, and receive again without MSG_PEEK to get the whole thing.
numInt
MSG_PEEK