473,395 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

SetSocketOption's KeepAlive timeout?

By setting
socket.SetSocketOption(SocketOptionLevel.Socket,So cketOptionName.KeepAlive,
1 ) can tell the socket to use keep-alives. But anybody know how to set the
timeout for the keep-alive without changing the registry?

Best Regards,
Wencheng Magiya
Nov 21 '05 #1
2 5859
use sleep

Wencheng Magiya wrote:
By setting
socket.SetSocketOption(SocketOptionLevel.Socket,S ocketOptionName.KeepAlive,
1 ) can tell the socket to use keep-alives. But anybody know how to set the
timeout for the keep-alive without changing the registry?

Best Regards,
Wencheng Magiya

Nov 21 '05 #2
What happens when the socket dies? Exception? Very cool.

"Wencheng Magiya" <2i*******@sneakemail.com> wrote in message
news:OK**************@TK2MSFTNGP10.phx.gbl...
By setting
socket.SetSocketOption(SocketOptionLevel.Socket,So cketOptionName.KeepAlive,
1 ) can tell the socket to use keep-alives. But anybody know how to set
the timeout for the keep-alive without changing the registry?

Best Regards,
Wencheng Magiya

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nathan Kerr | last post by:
I have been working with KB Article 812404 "HOW TO: Write Pluggable Protocol to Supprot FTP in Managed Classes by Using Visual Bassic.NET". I have modified the code to run on a Pocket PC. In the...
0
by: Ziphyre | last post by:
Hi, I can't send 'Connection: Keep-Alive' property in the second connection of my HttpWebRequest. Suppose: HttpWebRequest hreq = ..... hreq.KeepAlive = true; HttpWebResponse hresp =...
0
by: Greg | last post by:
I have a problem with KeepAlives. I need to use them for crawling a secure server, but if I crawl too long the application memory keeps increasing and doesn't decrease. After lots of testing,...
1
by: okaminer | last post by:
Hi This is for the experts I have override the GetWebRequest method and set the keepalive property to false in order to overcome a certain in .NET web service problem. My problem now is that...
2
by: Volker Hetzer | last post by:
Hi! I've got a problem with the GC.keepalive function, as used in the examples at http://msdn2.microsoft.com/en-US/library/system.gc.keepalive.aspx .. There they have a class "Example",...
3
by: Ryan Liu | last post by:
Hi, I use Server: Use an endless thread to lisiten to clients requests: while(true) { TcpClient client = myListener.AcceptTcpClient();
2
by: Atmapuri | last post by:
Hi! I was looking at the details of how KeepAlive works to handle my unmanaged code interop. Several question came up. Assuming I have: public Test2(Object a) { }
0
by: morgan22 | last post by:
Hi I'm trying to build a sniffer-like application and I'm using this code : Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Raw,...
5
by: loial | last post by:
I have a problem with a ssh connection in python I get the error 'NoneType' object has no attribute 'exec_command' I am thinking that maybe the ssh connection is timeing out. Since I have...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.