You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello, could you have any example for zmq with udp?
when I use this code with udp, but not success.
I want using multicast udp, here is server code
v0.16.0
server
// prepare the publisher
pub := zmq4.NewPub(context.Background())
defer pub.Close()
err := pub.Listen(fmt.Sprintf("udp://224.0.0.55:%s", port))
if err != nil {
log.Fatalf("could not listen: %v", err)
}
time.Sleep(time.Second * 1)
fmt.Println("start")
msg := []byte(`hello there`)
msgB := zmq4.NewMsgFrom(
[]byte("B"),
msg,
)
start := time.Now()
for i := 0; i < num; i++ {
pub.Send(msgB)
}
elapsed := time.Since(start)
fmt.Println("Elapsed:", elapsed)
fmt.Println("pps:", float64(num)/elapsed.Seconds()/10000, "w")
client
...
the server will fail with message psenvpub: 2024/02/05 18:29:19 could not listen: zmq4: could not listen to "udp://224.0.0.55:5563": listen udp 224.0.0.55:5563: address 224.0.0.55:5563: unexpected address type
it seam error posted from net package
The text was updated successfully, but these errors were encountered:
Same issue here. The problem is that (trans netTransport) Listen() would need to use net.ListenUDP() rather than net.Listen() for UDP, but then the interface would have to be refactored because the returned net.UDPConn does not implement net.Listener.
hello, could you have any example for zmq with udp?
when I use this code with udp, but not success.
I want using multicast udp, here is server code
v0.16.0
the server will fail with message
psenvpub: 2024/02/05 18:29:19 could not listen: zmq4: could not listen to "udp://224.0.0.55:5563": listen udp 224.0.0.55:5563: address 224.0.0.55:5563: unexpected address type
it seam error posted from
net
packageThe text was updated successfully, but these errors were encountered: