Skip to content

IPv6 issue with Zmq Router? #307

@4LB3R70D

Description

@4LB3R70D

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/goczmq.v4@v4.1.0#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions