Boost logo

Boost Users :

Subject: Re: [Boost-users] udp::endpoint listen_endpoint invalid argument
From: jupiter (jupiter.hce_at_[hidden])
Date: 2017-04-12 00:45:47


Thanks Bjorn and Gavin, change localhost to an IPv4 address fixed that
problem, so how can we use the domain name rather than the IPv4 dot address?

Cheers.

On Tue, Apr 11, 2017 at 7:21 PM, Bjorn Reese via Boost-users <
boost-users_at_[hidden]> wrote:

> On 04/11/2017 07:32 AM, jupiter via Boost-users wrote:
>
> To simplify it, I changed to:
>> udp::endpoint listen_endpoint(
>> boost::asio::ip::address::from_string("localhost"), 15555);
>>
>
> Quoting the documentation:
>
> "from_string Create an address from an IPv4 address string in
> dotted decimal form, or from an IPv6 address in
> hexadecimal notation."
>
> You need to resolve "localhost" first.
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net