Skip to content

Commit d00ca70

Browse files
brad0AJenbo
authored andcommitted
Fix building with Asio 1.33.0 or newer
Asio 1.11.0 - Conversion between IP address types, and conversion from string to address, is now supported via the address_cast<>(), make_address(), make_address_v4() and make_address_v6() free functions. The from_string(), to_v4(), to_v6() and v4_mapped() member functions have been deprecated.
1 parent 1f1a5bd commit d00ca70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/dvlnet/tcp_server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tcp_server::tcp_server(asio::io_context &ioc, const std::string &bindaddr,
1818
: ioc(ioc)
1919
, pktfty(pktfty)
2020
{
21-
auto addr = asio::ip::address::from_string(bindaddr);
21+
auto addr = asio::ip::make_address(bindaddr);
2222
auto ep = asio::ip::tcp::endpoint(addr, port);
2323
acceptor = std::make_unique<asio::ip::tcp::acceptor>(ioc, ep, true);
2424
StartAccept();

0 commit comments

Comments
 (0)