[Boost-bugs] [Boost C++ Libraries] #2835: basic_stream_socket::available() does not work reliably

Subject: [Boost-bugs] [Boost C++ Libraries] #2835: basic_stream_socket::available() does not work reliably
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-03-05 23:17:37


#2835: basic_stream_socket::available() does not work reliably
------------------------------------+---------------------------------------
 Reporter: sidharth_at_[hidden] | Owner:
     Type: Bugs | Status: new
Milestone: Boost 1.39.0 | Component: None
  Version: Boost 1.38.0 | Severity: Problem
 Keywords: |
------------------------------------+---------------------------------------
 basic_stream_socket::available() often reports 0 bytes even when there is
 data available to be read.

 The implementation of basic_stream_socket::available() for windows uses
 ioctlsocket() with FIONREAD which Microsoft advises against using.
 (recv(MSG_PEEK) is not prescribed either).

 http://support.microsoft.com/kb/192599

 For clients wanting to poll for available data and then calling a blocking
 read, barring any other reliable way to peek for data availability, it
 would be better to have an isavailable() (based on select()) which a
 client could call before doing a read_some.

 I realize the root cause is a Microsoft issue, but it's a boost asio bug
 at the end of the day.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2835>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC