Android Question Wifi Client and Server at the same time

Carlo

New Member
Licensed User
Longtime User
Hello

I have to develop an Andoid APP for a smartphone with WiFi. The smartphone is working with HotSpot ebabled. The smartphone has to work like a TCP server in a local wifi network (talking with some local wifi sensors) but at the same time the smartphne has to work like a TCP client with a remote PC server (the smartphne has to trasmit data collected from the local sensors to the remote server). So the question is: can I have an APP working at the same time like a tcp client and like a tcp server (can I open at the same time and in the same APP a ServerSocket and a ClientSocket)?

Thanks for help
Carlo
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
So the question is: can I have an APP working at the same time like a tcp client and like a tcp server (can I open at the same time and in the same APP a ServerSocket and a ClientSocket)?
Yes, there is no problem. You can also open multiple servers and clients.

he smartphone is working with HotSpot ebabled. The smartphone has to work like a TCP server in a local wifi network (talking with some local wifi sensors) but at the same time the smartphne has to work like a TCP client with a remote PC server
I'm not sure that this will work. You need to test it.
 
Upvote 0
Top