Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

heartbeat messages help  RSS feed

 
Sree Nivas
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can anyone help me in solving the folloiwng queries in java socket. I need these 2 to be coded immediately.

1. Sample code to send heartbeat message from client to server.

2. How to make sure that client can receive any type of data from server? Here we are writing tcp client program, but don't know what type of it will receive from the server. So client must in a position to receive any type of data from server.

Pl help.

regards
Sree
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's dig a little deeper ...

What have you tried or thought of doing so far?

What kind of protocol does your client server communication use?

What is the purpose of the heartbeat? What happens if it stops beating?

How does the client receive data from the server? In response to a request?

If the server hands you some data what would you like it to look like? How are you going to figure out what it is?

What are you going to do with it?
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!