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
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
I´m not a network expert but i guess the server side is the problem.
Using different ports will probably solve it i guess as you are runng two different servers then.
If the server is implemented properly then it shouldn't matter. The server can distinguish between different socket connections.
Each connection is identified by <server port, client ip address, client port>. The client port of each connection is different.