Re: recvfrom with MSG_PEEK

Olaf Titz (olaf@bigred.inka.de)
Thu, 22 May 1997 23:58:02 +0200


> > Hence, if you pass in a NULL buffer with MSG_PEEK, it would make sense
> > to return the address of the incoming packet, again without removing
> > it. So the next time you call recvfrom, you get the same packet.
> For the trivial case of UDP. How about protocols that do priority ordered
> delivery (which as it happens we dont have) ?

With such protocols the assumption that consecutive MSG_PEEK queries
return the same message is invalid, thus this programming technique
useless. But that's a userland issue.

olaf