httpwebresponse.close方法 [英] httpwebresponse.close method
问题描述
嗨
在.net framework 3.5中,使用http 1.1,即使用持久连接并默认启用流水线.您能否让我知道有必要通过调用httpresponse.close或stream.close方法来释放连接来关闭流或连接 对于同一互联网资源的另一个HTTP请求?我的理解是,即使未调用httpresponse.close或stream.close,也是如此httpconnection,即servicepoint应该能够处理另一个并发请求.请确认.
每次发送请求时,都需要调用HttpWebrequest构造函数,并且必须先关闭响应才能创建请求. /blockquote>
Hi
In .net framework 3.5 , http 1.1 i.e persistent connections is used and pipelining is enabled bydefault. Could you please let me know it is neccessary to close stream or connection by calling httpresponse.close or stream.close method to release a connection for another http request to the same internet resourece ? My understanding is even if httpresponse.close or stream.close is not called then too httpconnection i.e. servicepoint should be able to server another concurrent request. Please confirm.
解决方案You need to call the HttpWebrequest construtor every time you send a request, and you can't create the request without closing the response first.
这篇关于httpwebresponse.close方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!