ropensci / rzmq

R package for ZMQ
https://docs.ropensci.org/rzmq
84 stars 30 forks source link

change connect.socket in poll.socket example from * to localhost #58

Open jcai849 opened 3 years ago

jcai849 commented 3 years ago

The poll.socket() example left me with an error at the changed line; Binding on all endpoints with connect.socket() as per the example yields the following:

> connect.socket(out.socket,"tcp://*:5557")
Invalid argument

With associated errors:

> zmq.errno()
[1] 22
> zmq.strerror()
[1] "Invalid argument"

Specifying "tcp://localhost:5557" as endpoint ensures appropriate connection, and fixes the issue.