udp::endpoint listen_endpoint invalid argument

Hi, I built doc/html/boost_asio/example/timeouts/blocking_udp_client.cpp on Debian Jessie, but when I run it, I got Invalid argument on the statement of udp::endpoint listen_endpoint( boost::asio::ip::address::from_string(argv[1]), std::atoi(argv[2])); To simplify it, I changed to: udp::endpoint listen_endpoint( boost::asio::ip::address::from_string("localhost"), 15555); Appreciate any clues what's wrong with that statement and why it caused invalid argument? Thank you.

On 11/04/2017 17:32, jupiter via Boost-users wrote:
I built doc/html/boost_asio/example/timeouts/blocking_udp_client.cpp on Debian Jessie, but when I run it, I got Invalid argument on the statement of udp::endpoint listen_endpoint( boost::asio::ip::address::from_string(argv[1]), std::atoi(argv[2]));
To simplify it, I changed to: udp::endpoint listen_endpoint( boost::asio::ip::address::from_string("localhost"), 15555);
Appreciate any clues what's wrong with that statement and why it caused invalid argument?
What command line parameters did you call it with?
participants (2)
-
Gavin Lambert
-
jupiter