client/server periodic data transfer
-
hi everyone, I'm able to transfer string data from server to client. But my recent code runs,transfers the string and stops. My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?, thanks in advance.
-
hi everyone, I'm able to transfer string data from server to client. But my recent code runs,transfers the string and stops. My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?, thanks in advance.
-
hi everyone, I'm able to transfer string data from server to client. But my recent code runs,transfers the string and stops. My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?, thanks in advance.
A server should reply a client's request, no more, no less. It should not try and keep a list of clients, and it should not take any initiative in communications. If you want periodic communication between one or more clients and a server, make the clients request new data periodically. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use < PRE > tags for code snippets, it preserves indentation, and improves readability.
-
hi everyone, I'm able to transfer string data from server to client. But my recent code runs,transfers the string and stops. My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?, thanks in advance.
teknolog123 wrote:
My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?
I think your client/server module is working reversely. Instead of server sending data to client every minute, let client do the request to server for the data and let server keep listening for the client requests. I think that makes sense, right?
Knock out 't' from can't, you can if you think you can. :cool:
-
A server should reply a client's request, no more, no less. It should not try and keep a list of clients, and it should not take any initiative in communications. If you want periodic communication between one or more clients and a server, make the clients request new data periodically. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use < PRE > tags for code snippets, it preserves indentation, and improves readability.
thanks Luc!
-
teknolog123 wrote:
My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?
I think your client/server module is working reversely. Instead of server sending data to client every minute, let client do the request to server for the data and let server keep listening for the client requests. I think that makes sense, right?
Knock out 't' from can't, you can if you think you can. :cool:
Yes you're right! Thanks, I'll do so
-
thanks Luc!
you're welcome. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use < PRE > tags for code snippets, it preserves indentation, and improves readability.
-
A server should reply a client's request, no more, no less. It should not try and keep a list of clients, and it should not take any initiative in communications. If you want periodic communication between one or more clients and a server, make the clients request new data periodically. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use < PRE > tags for code snippets, it preserves indentation, and improves readability.
50!
-
Yes you're right! Thanks, I'll do so
You are welcome. :)
Knock out 't' from can't, you can if you think you can. :cool:
-
hi everyone, I'm able to transfer string data from server to client. But my recent code runs,transfers the string and stops. My problem is that I want to update that string every minute. I can make server send the updated data every minute but how can the client keep listening?, thanks in advance.