By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,022 Members | 1,398 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,022 IT Pros & Developers. It's quick & easy.

C#-HTTPListener: Best way to handle idle connections

P: 71
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/fidDA9BB7F0CB74CAC8C021B42DF9EB9DCAFB88845E.aspx?s =httpwebrequest

setting the timeout explicitly.

TIA.
Nov 21 '08 #1
Share this Question
Share on Google+
2 Replies


Plater
Expert 5K+
P: 7,872
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

P: 71
Ok..Thank you for the suggestion.
I think that's how it really works
Nov 26 '08 #3

Post your reply

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