Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1096443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:17:07+00:00 2026-05-17T00:17:07+00:00

Im implementing my own proto in Java, it will use a heartbeat over a

  • 0

Im implementing my own proto in Java, it will use a heartbeat over a TCP connection that I also use to transfer messages and files.
For the client I am using blocking socket I/O.
So here is how Im planning that will work…
I will set the socket timeout for K seconds and make the heartbeat stay sending messages in an interval T, so that T < K.
If the timeout expires, looks like the server is offline for the client, or vice-versa.

The heartbeat is the server sending a String and the Client answering another.

I dont want to waste a lot of bandwidth but with a big timeout the server could be mistaken about the client´s status.

What is a good K interval? I am thinking about 40 seconds

PS: the strings are 8 letters sent in ISO-8859-1 so its small data

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:17:08+00:00Added an answer on May 17, 2026 at 12:17 am

    “K” is highly dependent on the specific traffic profile of the application (e.g. how often is application data transfered) and the application’s tolerance for loss of connection (e.g. how quickly does the receiver need to detect the loss of connection). Unfortunately, low overhead and quick detection are opposing goals.

    It sounds like your trying to address the TCP half-open connection issue (RFC 793 meaning). If so and if you weren’t aware of the term “half-open”, researching TCP “half-open” might point you toward some useful information like:

    http://www.codeproject.com/Articles/37490/Detection-of-Half-Open-Dropped-TCP-IP-Socket-Conne.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While implementing my own IFilter I found that most likely some consumers will require
I'm implementing my own NSBitmapImageRep (to draw PBM image files). To draw them, I'm
I'm implementing my own double-buffering for a BufferedImage in a JPanel so that I
Where can I get info about implementing my own methods that have the ellipsis
We have an application that is essentially implementing its own messaging queue. When a
I am having some trouble with implementing my own observer in Java on the
I am implementing my own Java class for sorting a List<T> in eclipse. I
I am implementing my own linked list in Java. The node class merely has
I'm enamoured with the idea of implementing my own single-entry-point gateway that does two
I'm implementing a dynamic language that will compile to C#, and it's implementing its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.