-
Notifications
You must be signed in to change notification settings - Fork 4
how to bind to a IPv4 socket #137
Comments
And
|
Currently its not supported, but it should be straight forward to add, a PR would be most welcomed. By default the context enables the IPv6 features which probably forces a v6 socket to be created even with a v4 address. So I'm assuming allowing the user to modify the following line would work: Line 358 in ea8eef6
I think the best approach would be to add a new |
Yeah pretty sure this would work, after reading the zmq API doc:
(Taken from http://api.zeromq.org/master:zmq-ctx-set) |
Ah, I see. So it is creating an IPv4 socket, it's just creating an IPv6 socket as well. It seems my problem is different than I thought, then -- |
The |
All attempts to bind to an address are creating an IPv6 socket instead of the desired IPv4 socket.
For example:
Results in the following output:
Using my actual IP address instead of 0.0.0.0 has the same general problem:
I saw some examples that specify the interface, for example:
But this results in a panic:
The backtrace:
I assume I'm doing something wrong, any help would be greatly appreciated.
If helpful, the actual code where I'm trying to implement this can be viewed here:
https://github.com/jeremyandrews/goose/blob/gaggle/src/manager.rs
And I'm running with the following command:
I'm compiling on Linux in an Ubuntu-based distribution (PopOS). Here's my interfaces:
The text was updated successfully, but these errors were encountered: