lwip-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-members] [patch #5049] Add primitive MSG_PEEK support


From: Christopher Pow
Subject: [lwip-members] [patch #5049] Add primitive MSG_PEEK support
Date: Thu, 14 May 2015 13:32:38 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36

Follow-up Comment #7, patch #5049 (project lwip):

I have a user report that suggests the implementation of MSG_PEEK is not quite
correct. The data is being returned [as outlined in the second note in comment
#4]. But subsequent calls to recv without MSG_PEEK do not return the same
data. 

The problem has a software work-around, but ideally the MSG_PEEK flag would
behave differently than non-MSG_PEEK flag.

The software work-around is to call recv() with flags=MSG_PEEK and length=0.
This forces LWIP to return the number of bytes available but *not* advance
beyond them. Then subsequent calls to recv() with flags=0 actually return the
data as expected.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5049>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]