HttpListenerTimeoutsElement.IdleConnection 属性

定义

获取允许空闲连接的时间(以秒为单位)。

public:
 property TimeSpan IdleConnection { TimeSpan get(); };
[System.Configuration.ConfigurationProperty("idleConnection", DefaultValue=0, IsRequired=false)]
public TimeSpan IdleConnection { get; }
[<System.Configuration.ConfigurationProperty("idleConnection", DefaultValue=0, IsRequired=false)>]
member this.IdleConnection : TimeSpan
Public ReadOnly Property IdleConnection As TimeSpan

属性值

允许空闲连接的时间(以秒为单位)。

属性

注解

只有在连接上的第一个请求路由到 HttpListener之后,才会强制实施此超时。

在分析标头之前,系统无法确定与请求关联的请求队列或 URL 组。 因此, HttpListener 对连接的第一个请求强制使用默认 IdleConnection 计时器。 Keep-Alive 连接的后续请求将使用此属性上设置的值。

适用于

另请参阅