Problem: UDP engine does not support IPv6

Solution: Add IPv6 support
This commit is contained in:
Lionel Flandrin
2018-05-05 00:44:13 +02:00
parent 7aba6821ac
commit b0df4be51c
12 changed files with 445 additions and 206 deletions

View File

@@ -534,7 +534,8 @@ int zmq::socket_base_t::bind (const char *addr_)
paddr->resolved.udp_addr = new (std::nothrow) udp_address_t ();
alloc_assert (paddr->resolved.udp_addr);
rc = paddr->resolved.udp_addr->resolve (address.c_str (), true);
rc = paddr->resolved.udp_addr->resolve (address.c_str (), true,
options.ipv6);
if (rc != 0) {
LIBZMQ_DELETE (paddr);
return -1;
@@ -876,7 +877,8 @@ int zmq::socket_base_t::connect (const char *addr_)
paddr->resolved.udp_addr = new (std::nothrow) udp_address_t ();
alloc_assert (paddr->resolved.udp_addr);
rc = paddr->resolved.udp_addr->resolve (address.c_str (), false);
rc = paddr->resolved.udp_addr->resolve (address.c_str (), false,
options.ipv6);
if (rc != 0) {
LIBZMQ_DELETE (paddr);
return -1;