jeromq
jeromq copied to clipboard
socket connect to a unreachable ip caused the app crashed!
I use the PUB/SUB,subcriber to bind while the publicher to connect. EXCEPTION=java.net.SocketTimeoutException: failed to connect to /192.168.2.88 (port 9900): isConnected failed: ETIMEDOUT (Connection timed out) My device ip address is 172.10.0.21,while I want edit to connect to a unreachable ip 192.168.2.88 or any address else.this will cause my app crashing which I can‘t catch。and when I try to check like this if(publisher.connect("tcp://192.168.2.88:9900")){},which always return true immediately.can you just offer any suggestion for this problem.thank you!
Is there a reason that are binding on the subscriber side instead of the publisher side? AFAICT from the zguide, the publisher side is the one that binds: http://zguide.zeromq.org/page:all#Getting-the-Message-Out
When I try to connect an Ip in the same network segment which didn't bind a subscriber, This problem will not occur。so I guess it may not the problem.
Hi, do you have an example of code demonstrating the problem?
Blocked pending response from @Anotherdgf.