• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Continueous ping from server end point.

 
mallikarjun dontamsetti
Ranch Hand
Posts: 246
Firefox Browser Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is there any way that i can get ping from server to client for a perticular time or the client side task is completed.
Like client is sending a large amount of data and server need to send a message for every second to clent.
Please guide me to solve this thing.
 
Henry Wong
author
Marshal
Pie
Posts: 21440
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mallikarjun dontamsetti wrote:
Is there any way that i can get ping from server to client for a perticular time or the client side task is completed.
Like client is sending a large amount of data and server need to send a message for every second to clent.
Please guide me to solve this thing.


What you are describing is a heartbeat. You want some mechanism for the client to confirm that the server is still alive.

If you trust the quality of your network, then you can use the socket reset exception to determine that it is okay. In general though, it is probably not a good idea to assume that a connected socket means the application on the other side is still alive.

If you want to confirm that the application on the other side is alive and able to continue working, you need to have support for it in the protocol. You need to add a heartbeat into your protocol.

Henry
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic