Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 issue with Zmq Router? #307

Open
4LB3R70D opened this issue Sep 21, 2022 · 0 comments
Open

IPv6 issue with Zmq Router? #307

4LB3R70D opened this issue Sep 21, 2022 · 0 comments

Comments

@4LB3R70D
Copy link

4LB3R70D commented Sep 21, 2022

Hello there!

first of all, thanks for this software! I am adding here an issue because I am using this library in my project and I am having an error at the time of using IPv6. It could be that maybe I am doing something wrong, and if so, it's good to know how to do it right.

The version I am using of this library is: v4.1.0, and what I am doing is the following:

serverAddress := "tcp://*:" + strconv.Itoa(ctx.Cnfg.Networkorking.MQ.Port)

if newZmqRouter, err = zmq.NewRouter(serverAddress); err == nil {
		if ctx.Cnfg.Networkorking.MQ.IPv6{
			newZmqRouter.SetIpv6(1)
		} 
		if newZmqPoller, err := zmq.NewPoller(newZmqRouter); err == nil {
                    ...[more code]
                }
}

The expected result should be to open the port in IPv6 when 'ctx.Cnfg.Networkorking.MQ.IPv6' = true, but it is always using IPv4.
It's funny because if you call 'Ipv6() ' (https://pkg.go.dev/gopkg.in/zeromq/[email protected]#Sock.Ipv6) right after doing the set, the value is the one that you added it.

Just to add you more context, I am using Go 1.19 in a Linux machine (Ubuntu 22.04.1 LTS)

So anyone that can help me here in knowing if this is a real issue, or it is just my bad understanding about how to use the library; will be more than welcome

thanks again in advance!

best regards,

Alberto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant