Re: [Boost-bugs] [Boost C++ Libraries] #2832: Asio sync IO functions need timeout parameters

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2832: Asio sync IO functions need timeout parameters
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-03-20 15:16:36

#2832: Asio sync IO functions need timeout parameters
  Reporter: Stephan Menzel <stephan.menzel@…> | Owner:
                                                | chris_kohlhoff
      Type: Bugs | Status: closed
 Milestone: Boost 1.39.0 | Component: asio
   Version: Boost 1.38.0 | Severity: Showstopper
Resolution: wontfix | Keywords:

Comment (by tom@…):

 Definitely, timeout is needed.
 What's interesting though is that it IS there, in one form. So if you use
 basic_socket_streambuf, so if you wrap a socket in an iostream, you DO get
 timeouts for connect, read and write. There's an "expiry" field you can
 set on the stream. They are in the associated draft standard as well. So
 clearly someone "high up enough" thinks it's useful enough at some level
 to add at least partial support for a read with timeout, it just doesn't
 seem to have been pushed far enough.

 You can replicate the logic manually if necessary, as long as you aren't
 wanting to use a higher level construct such as the SSL socket stream.

 Personally I think it's a huge shame that this isn't implemented fully. It
 seems to be all that's missing from making asio a complete and general
 networking library for C++. As it is, I have to decide up front whether to
 use it or not, depending on what I want to do. Maybe I use it in the
 server, but in the client I have to code differently, and use a different
 library. It's so nearly the go to toolbox for doing networking.

 It's not like it should be that complex to implement. The
 basic_socket_streambuf code seems to prove what the logic should be. You
 want exactly that, but in the tcp::socket class instead.

 Please, please please.

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2018-03-20 15:23:13 UTC