Closed guill-delacourt closed 1 year ago
rather than a new option, probably better to just fallback to hostname resolving if interface resolving fails
OK, I'm closing this PR. I'll open a new one as changing the code to fallback to hostname resolving leads to simpler changes.
This PR partially fixes the issue #4514. It is currently limited to the the TCP sockets. This PR introduces a new socket option ZMQ_BIND_RESOLVE_NIC, by default set to true. When this option is set to true, names in addresses for binding sockets are resolved as network interface names, which is the current behaviour. When this option is set to false, names in addresses for binding sockets are resolved as hostnames, like non-binding sockets.