473,568 Members | 2,795 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C#-HTTPListener: Best way to handle idle connections

71 New Member
Having a multiple client/server using a C# httplistener/httpwebrequest to transfer message.

How should I handle idle connections?
Will it be the job of the server or client?
Does using a ping mechanism effective?
Please suggest others ways..

My idea as of now is this:
http://www.koders.com/csharp/fidDA9BB7F0CB74 CAC8C021B42DF9E B9DCAFB88845E.a spx?s=httpwebre quest

setting the timeout explicitly.

TIA.
Nov 21 '08 #1
2 4814
Plater
7,872 Recognized Expert Expert
I would think the Server should certainly be handling Idle connections.
Depending on how you talk to the Clients, it would probably be curtious to send the Client that is connected some sort of "hey you are idle, I am closing your connection" and then close the connection.
Nov 21 '08 #2
dantz
71 New Member
Ok..Thank you for the suggestion.
I think that's how it really works
Nov 26 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
834
by: Simon Harris | last post by:
Hi All, I'm trying to create a class to connect/disconnect a database. Code I have so far is below, problem is that the closeconn function gives me an error - Name 'SPDOleDbConnection' is not declared. Also getting the same problem in my code where I want to use the connection (also shown below) Would appreciate it if anyone has any...
0
2335
by: Philippe Lang | last post by:
Hello, After using Postgresql for a while, through ODBC / MS Access, I'm not able to connect to the server anymore. The server reports "Too many clients connected already". With a "ps -afx", I can see a lot of idle postgresql connections, which correspond for sure to ODBC connections that haven't been closed properly, and that remain...
0
1442
by: Stefan Felkel | last post by:
hi! i have searched a lot in these pgsql-groups and on the internet, but found no really helpful information for my problem. the famous error >> database "xyz" is being accessed by other users is my problem.
4
12843
by: Josh Close | last post by:
Is there a way to remove idle connections? My postgres server is getting serveral hundred idle connections. It's due to a postgres .NET provider not closing the connections properly. I don't want to kill them all, or restart postgres everytime the connections go crazy. -Josh ---------------------------(end of...
1
8196
by: Praveen_db2 | last post by:
Hi All I came across a small doubt. Suppose I have Max Connections parameter set to 200. There are now 200 connections to the database. Out of these 200 connections 50 are idle. What will happen if a new user tries to connect to the database? Whether he will receive error about MAXCONNECTIONS exceeded or he will be allotted a connection as...
1
1378
by: hunki | last post by:
We recently moved from Websphere to JBOSS, we know WebSphere automatically respawned connections when they were NULL but how to handle this in JBOSS. Thanks, hunki
4
2225
by: Troels Arvin | last post by:
Hello, Some of our SAS users seem to initiate 20+ idle connections to DB2 every time they start SAS. I'm inclined to tell them to cut down on their DB2 connection number, but then again, if the connections are very cheap why bother. Are idle DB2 connections cheap, from the DBMS' point of view? (I fear that there's no easy answer to...
0
1093
by: Ronald S. Cook | last post by:
How would you recommend passing errors back from your proc to your business tier to the client (assuming you have full control of all layers)? Take InsertUser for instance. The proc will automatically raise an error if someone tries to create a user name for themselves that is already taken. I could relay that error to the client but the...
2
5359
by: Nebu Pulickal | last post by:
I am having a postgresql database server and the idle connections are not closing themselves. They are increasing to large numbers as time passes and the web page is not loading. The code developer says that the code for closing these idleconnections are included in the code itself. But it is also not working. We have tried to close by giving...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7916
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8117
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7660
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6275
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5498
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2101
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.