Android Question Two apps TCP connect to same server

Rusty

Well-Known Member
Licensed User
Longtime User
I have two apps running on the same android device. Each needs to connect to the same TCP/IP server but the messages need to be segregated and delivered to the individual android app.
Is there a way to have simultaneous connections to a TCP server by two apps on the same device (same IP address)?
Thanks in advance,
Rusty
 

DonManfred

Expert
Licensed User
Longtime User
Why it should not work?

The only reason i see is that the server-side is limiting it to one ip or so?
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks Don,
I tried it and they will both connect, but they both get each other's traffic.
Do you think changing the port number on one and starting two listeners on the server would do it?
Rusty
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks Erel,
You are absolutely correct. The different sockets distinguish the communications adequately.
Thanks
Rusty
 
Upvote 0
Top