Browse Source

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.
pull/8484/head
Brad Smith 1 month ago committed by Anders Jenbo
parent
commit
d00ca7022c
  1. 2
      Source/dvlnet/tcp_server.cpp

2
Source/dvlnet/tcp_server.cpp

@ -18,7 +18,7 @@ tcp_server::tcp_server(asio::io_context &ioc, const std::string &bindaddr,
: ioc(ioc)
, pktfty(pktfty)
{
auto addr = asio::ip::address::from_string(bindaddr);
auto addr = asio::ip::make_address(bindaddr);
auto ep = asio::ip::tcp::endpoint(addr, port);
acceptor = std::make_unique<asio::ip::tcp::acceptor>(ioc, ep, true);
StartAccept();

Loading…
Cancel
Save