How does Response.IsClientConnected work under the covers?
How does Response.IsClientC开发者_开发百科onnected work under the covers?
A good way to find out is by using .NET Reflector and examining the Response.IsClientConnected
property. It allows you to decompile and anaylze .NET assemblies. It's an essential tool in the .NET developers arsenal.
Taking Phaedrus' advice, I used Reflector to look at the code in System.Web. It looks like this property calls into native methods in webengine.dll.
This method seems to be called under IIS6: EcbIsClientConnected (http://forums.iis.net/t/1187030.aspx)
This method seems to be called under IIS7: MgdIsClientConnected
Not particularly helpful. ;-)
精彩评论