Device android as server for several clients

Priamo

Member
Licensed User
Longtime User
Hello,

as the title. Is it possible?
I need to have an app server on one device Andorid, tablet . This app is connected to a wifi network.
Now i want that several clients android tablet connected with the app server,to the same network, and the server send messages at the same time to all connected clients. Is possible? Can you help me with a tutorial or a suggestion?
thanks.
 

mc73

Well-Known Member
Licensed User
Longtime User
Yes it is.
Check the astreams tutorial for a start.
A small advice: If you intend to have 'heavy' in-outs, get a good android tablet to act as server. Very cheap ones, tend to behave improperly (wifi problems, processing time problems and so on).
 
Upvote 0

Priamo

Member
Licensed User
Longtime User
Yes it is.
Check the astreams tutorial for a start.

The tutorial already know him and studied, for scoring other app like that but for server PC. Now I've made ​​a test, working, but I have used this ploy, instantiate a number of Astream and socket, for each new connection and associate the first Astream socket is not initialized, and add in a list associated with the Astream. When I send the data I scroll the list, I load the Astream and then launch the write, and it works. I would avoid instantiating all these Astream and socket, there is a hear to avoid it in your opinion?
Thank you very much for availability.

A small advice: If you intend to have 'heavy' in-outs, get a good android tablet to act as server. Very cheap ones, tend to behave improperly (wifi problems, processing time problems and so on).

i guess.
 
Upvote 0

Priamo

Member
Licensed User
Longtime User
It might be easier to use HttpServer library. This will allow you to run a real http server on your device. The clients can then send requests every few seconds. It will be much easier to build.

Thanks Erel,

There is a tutorial?
 
Upvote 0

Priamo

Member
Licensed User
Longtime User
Hi Erel,
i have read the 3rd, but at this point of my project, change the comunication isn't a good thing. Farther, with my system i have the feature that i can speak with the specific ip.

Yes you are right, the httpserver is very easy to implement in similary project, particularly if you are starting the project.

Thank you erel for the availability and the suggestions.
 
Upvote 0
Top