+ 2

How to make a socket program with java which is able to have several client and one server?

My main problem is how is it possible to send data from clients to server while server is offline and when server get back online receive all data from all client separately(I mean be able to see which client send what) and while clients are offline send data from server to clients

30th Nov 2020, 12:44 AM
hamid
hamid - avatar
2 Réponses
+ 1
Write the data to a file or a database or something and when your client or server comes back online, send them everything you saved locally
4th Dec 2020, 10:12 PM
Jeremy
Jeremy - avatar
+ 1
Jeremy thanks but now i face into another problem. I want to close my application then its thread will stop so how can i send or even figure out that whether server is online or not ??
4th Dec 2020, 10:26 PM
hamid
hamid - avatar