Closed binarytrails closed 5 years ago
Is the IPV6 supported
Supported. See server's setting chapter.
@eao197 oh yes I saw this actually, I'm doing the same for the client but I mean at runtime because these settings are set before running the restinio main loop. Does RESTinio support both at runtime? Because I had trouble figuring out why it only accepts ipv4 or ipv6 connections once started
I saw that you can do ip version independent with restinio::asio_ns https://www.boost.org/doc/libs/1_42_0/doc/html/boost_asio/reference/ip__address.html
To create asio::ip::tcp::endpoint
we should specify a protocol. The corresponding fragment is here. Protocol is being got from server settings (by default it is ipv4), but can be changed to ipv6.
@eao197 so both are not supported simultaneously at runtime? you can only start in ipv4 or ipv6, right?
I think your question is not related to RESTinio, but to Asio: https://stackoverflow.com/questions/31125229/accept-ipv4-and-ipv6-together-in-boostasio
Oh well, I guess it could be simply said that one does not have to set settings.address
and set settings.protocol(restinio::asio_ns::ip::tcp::v6())
as said in your link:
If you create a IPv6 acceptor, it will accept both IPv4 and IPv6 connections if IPV6_V6ONLY socket option is cleared.
Which is the case by default in RESTinio. Thanks!
Is the IPV6 supported or is it planned to be supported in a near future?
Thank you!