1
votes

I am working on a client server-application in Java. My server will be a desktop app in Java and my client is an Android app. I have created an Android app in which I can connect to my server and send data through a socket using the IP address of the server.

My main question is this: Suppose I connected to my server using a cellular data network and the app transferred half of my data through it, and I want to transfer the other part of my data using WiFi. Is it possible to send data over the same socket (which I originally connected to using a cellular network) through WiFi, by switching my preferred network to WiFi?

1
I would suggest the title 'Switching network connections while communicating via a socket connection'RustyTheBoyRobot

1 Answers

1
votes

No, it is not possible to use same socket after switching Network because once u switch network ur connection with the server will break down and u will need to connect to the server again.