zeromq / zmqpp

0mq 'highlevel' C++ bindings
http://zeromq.github.io/zmqpp
Mozilla Public License 2.0
438 stars 195 forks source link

client push with connect: Abort execution after "Invalid argument"-Exception #177

Open krombel opened 7 years ago

krombel commented 7 years ago

zmqpp (-Client) aborts execution if it wants to push with connect.

I had following setup:

Library-States:

libsodium: 66045e6 libzmq: 398f256 zmqpp: 09ef3ae compiled as advised in README.md Compilation run without any errors but on runtime i get the following out:

Output of execution

"Server-Side" with pull

$ zmqpp -adv pull -b tcp://:4242 binding to tcp://:4242 _: receiving via socket is enabled. _: Warning - Detailed logging is enabled. **: Polling for incomming message data.

"Client-Side" push

$ zmqpp -adv push tcp://127.0.0.1:4242 Connecting to stdin connecting to tcp://127.0.0.1:4242 While sending packets is allowed data entered on standard in will be sent to the 0mq socket. Message parts will be considered terminated by newline. Messages will be considered terminated by an empty part. The empty part itself will not be included.

_: reading from stdin is enabled. : sending via socket is enabled. *: Warning - Detailed logging is enabled. *_: Polling for incomming message data. terminate called after throwing an instance of 'zmqpp::zmq_internal_exception' what(): Invalid argument Aborted

shiplu commented 6 years ago

I also faced this problem. I used tcp://*:4242 which is usually supported by zmq. But for some reason, it didn't work. what I can see from your address for server tcp://:4242 is definitely wrong. Go for very specific like tcp://127.0.0.1:4242 or tcp://*:4242 (be aware, * is a metacharacter in shell)