Java/android/hello #134
-
Hello ! I'm not able to connect https://github.com/zeroc-ice/ice-demos/blob/3.7/java/android/hello/src/main/java/com/zeroc/hello/HelloApp.java with the hello cpp11 demo. I tried to change tcp port on 10004 on the android demo to match server.config but it still not working. It works with Ice Discovery tho... |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 4 replies
-
are you running the android demo from the simulator, what IP address is the server listening on? |
Beta Was this translation helpful? Give feedback.
-
Ok I fixed it : I need to setup the tcp port to 45049 ( line 392 of the last link), I found this port number with the start message of the cpp client ( endpoint line, first port i've seen lol ). Can you explain me why plz ? I'm kinda lost ( I'm not working directly on the demo but I'm doing a Univ project which starts from it ). Thanks for your reactivity btw I'm running the demo on my current cellphone, the server seems to listen on 192.168.1.5:10004 ( that's what I understand from the serverconfig file of the cpp11 IceDiscovery/hello server & my ifconfig command ofc ) |
Beta Was this translation helpful? Give feedback.
-
By default the server listens on tcp 10000, ssl 10001, ws 10002, and wss 10003 ice-demos/cpp11/Ice/hello/config.server Line 11 in 7a91b54 port 10004 is used for Admin object if enabled ice-demos/cpp11/Ice/hello/config.server Line 71 in 7a91b54 The simpler to check what address the server listens on, is to enable network tracing in the config ice-demos/cpp11/Ice/hello/config.server Line 39 in 7a91b54 |
Beta Was this translation helpful? Give feedback.
-
I've started from the IceDiscovery/hello server not /Ice/hello, so I have this config.file ( not edited ). It doesn't work by default with the tcp port set at 10000. So i've just edited the admin port by mistake, but it I don't understand why I need to change tcp port from 10000 to the magic number 45049 on my android client. Android Client line 39X : is not working with the IceDiscovery/hello server |
Beta Was this translation helpful? Give feedback.
-
This demo works with the 2 servers to show different use cases:
see https://doc.zeroc.com/ice/3.7/ice-plugins/icediscovery This is mention in the Android hello README https://github.com/zeroc-ice/ice-demos/tree/3.7/java/android/hello |
Beta Was this translation helpful? Give feedback.
-
Yep so ok I've missed that so far x'). Is there a way to print the Endpoint port once the Discovery server launched ? Anyway thank u very much my IceLord for your time ! |
Beta Was this translation helpful? Give feedback.
-
If you set https://doc.zeroc.com/ice/3.7/property-reference/ice-trace#id-.Ice.Trace.*v3.7-Ice.Trace.Network |
Beta Was this translation helpful? Give feedback.
-
Thx very muchhhhh mann, you are so nice, have a nice day ! |
Beta Was this translation helpful? Give feedback.
If you set
Ice.Trace.Network=3
in the server config file, you should see the address the server bindshttps://doc.zeroc.com/ice/3.7/property-reference/ice-trace#id-.Ice.Trace.*v3.7-Ice.Trace.Network