Efficient UDP Programming
Is there anyway of reading some data from a UDP socket without removing it from the received queue? What I need to do is read in the header from a packet to determine how large of a memory chunk I need to allocate.
Thanks,
Chuck
I suggest you to have a fixed size for your header, then you can read the header that ll say you about the rest of data following the header.
Luciano
Chuck Winters escreveu:
Quoted 16 lines
Is there anyway of reading some data from a UDP socket without removing it from the received queue? What I need to do is read in the header from a packet to determine how large of a memory chunk I need to allocate.
Thanks,
Chuck-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html