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

  • SEARCH
  • Home
  • 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 8390169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:54:55+00:00 2026-06-09T18:54:55+00:00

I currently have an asynchronous TCP/IP socket C# WinForms application that is the Server

  • 0

I currently have an asynchronous TCP/IP socket C# WinForms application that is the “Server” application. The application holds persistent sockets to the clients. I would like to implement a heartbeat packet to detect Half-Open connections.

Initially I thought about just creating a loop and sending the heartbeat to my entire collection of sockets every xx number of seconds. However, I think this would be bad for performance.

I think I should somehow stagger the heartbeat and send to a few hundred sockets at once. Does anyone have any experience/techniques/implementations for effectively accomplishing this?

  • 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-06-09T18:54:57+00:00Added an answer on June 9, 2026 at 6:54 pm

    I do this (for an order-of-magnitude more sockets) simply by tracking how long ago I last spoke to (or heard from) a particular socket.on an interval, I ping those over a given age. Assuming sockets connect / disconnect / communicate uniformly, this gives me a fairly uniform distribution. Besides, you can always cap the ping to a finite number of sockets per iteration: because you’re tracking the last-talked info, the ones you don’t get to will still be eligible next time.

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

Sidebar

Related Questions

I have a class that uses 'System.Net.Sockets.Socket' directly for network comunication, and currently I
I currently have a client-server application that involves a Silverlight client and a .NET
I have implemented an asynchronous TCP server that is spawned by another process. It
I am currently working on server application that has to deal with reasonable amount
I currently have a Palm WebOS application that uses an Ajax.Request to connect to
I currently work on a server/client program based on asynchronous socket. As far as
I currently have a ASP.Net MVC web application that needs to upload large files
I have an application that uses MSMQ for asynchronous processing of certain things. I
I have a server and a client application, here's how it's currently implemented: The
I have a PHP application that currently has 5k users and will keep increasing

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.