Originally Posted By: andy
Is expected to return the data for a single UDP packet or all the data that is waiting on the socket?

UDP preserves packet-boundaries, and returns at most one packet per call to read(). TCP doesn't preserve the boundaries, and returns everything that's available.

Peter