Before I start, I wanted to let you know that I am noob to this networking thing. I am trying to make a TCP socket to communicate with an android application. When I run my code with
in flytsim shell, It works fine as it creates socket which can bind with all available interfaces. (Ref. https://stackoverflow.com/questions/16508685/understanding-inaddr-any-for-socket-programming)
But when I use it with
where IP_ADDR is my localhost IP, I get binding error saying it can’t assign requested address. upon checking it seems it gets the IP of the Docker and unable to reach the localhost. And as far as I can understand, docker IP is not visible outside to other devices on network.
I ran the same executable outside the flytos, in regular roscore, it binds to localhost. Can anyone tell me a way to create socket to localhost so I can connect to drone over it using android app.