Re: [Boost-bugs] [Boost C++ Libraries] #8503: Cannot connect to localhost without global connectivity

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8503: Cannot connect to localhost without global connectivity
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-05-24 13:10:44


#8503: Cannot connect to localhost without global connectivity
------------------------------------+---------------------------------------
  Reporter: Edward@… | Owner: chris_kohlhoff
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.53.0 | Severity: Problem
Resolution: invalid | Keywords: localhost AI_ADDRCONFIG
------------------------------------+---------------------------------------

Comment (by Edward Brey <Edward@…>):

 I realize that it is in theory possible to override the default when
 creating a query. Sometimes, however, that option gets abstracted away. I
 ran into this problem when using the
 [https://github.com/zaphoyd/websocketpp WebSocket++] library, which in
 [https://github.com/zaphoyd/websocketpp/blob/experimental/websocketpp/transport/asio/endpoint.hpp
 endpoint.hpp] creates a query using the default options without exposing
 the options to users of the library. Of course, exposing the options would
 be one resolution to the
 [https://github.com/zaphoyd/websocketpp/issues/244 open issue], but it's
 nice to keep the API smaller if there is a "it just works" solution.

 Am I missing something about the virtues of AI_ADDRCONFIG? If 99% of the
 time, it's best to override the default and turn the flag off, isn't
 keeping AI_ADDRCONFIG as the default likely to trip up unsuspecting
 developers and lead to a lot of "Why doesn't this work on localhost?"
 headaches like I experienced.

 As computers become more mobile, this gotcha will grow more frequent. I
 encountered it simply by turning on airplane mode on my laptop (a commonly
 used Windows 8 feature).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8503#comment:2>
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:50:13 UTC