Venkatachalam
Lurker
Dear All,
I am developing an App and I would like to send data to two different servers running on two different computers. Socket client is running on Android device. On a button click event, I want to transfer two different information to two different servers. For transferring the information from device to two different servers there are two clients running on device. There is a OnClickListener event on the button, which triggers a thread which contains the connection to the servers. I am facing an issue in making this work, that is I tried creating two socket clients in same thread, and tried sending data to two different servers which eventually didnt work. So, I tried creating two different threads for OnClickListener event and so the client connection to each of the server is made from each thread. But eventually this again is not working. Kindly help me with this, if you have any suggestion.
I am developing an App and I would like to send data to two different servers running on two different computers. Socket client is running on Android device. On a button click event, I want to transfer two different information to two different servers. For transferring the information from device to two different servers there are two clients running on device. There is a OnClickListener event on the button, which triggers a thread which contains the connection to the servers. I am facing an issue in making this work, that is I tried creating two socket clients in same thread, and tried sending data to two different servers which eventually didnt work. So, I tried creating two different threads for OnClickListener event and so the client connection to each of the server is made from each thread. But eventually this again is not working. Kindly help me with this, if you have any suggestion.