TcpTransportBindingElement.ListenBacklog 属性

定义

获取或设置可挂起的最大排队连接请求数。Gets or sets the maximum number of queued connection requests that can be pending.

public:
 property int ListenBacklog { int get(); void set(int value); };
public int ListenBacklog { get; set; }
member this.ListenBacklog : int with get, set
Public Property ListenBacklog As Integer

属性值

Int32

返回可挂起的最大排队连接请求数。Returns the maximum number of queued connection requests that can be pending. 默认值为 10。The default is 10.

例外

该值不能小于 1。The value cannot be less than one.

示例

下面的示例演示如何获取 ListenBacklog 值。The following example shows how to get the ListenBacklog value.

int listenBacklog = bElement.ListenBacklog;

注解

ListenBacklog 是套接字级别的属性,描述要排队的“挂起接受”请求数。ListenBacklog is a socket-level property that describes the number of "pending accept" requests to be queued. 应确保最大并发连接数不超过基础套接字队列。Ensure that the underlying socket queue is not exceeded by the maximum number of concurrent connections.

适用于