NetTcpBinding.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

属性值

挂起的最大排队连接请求数。The maximum number of pending queued connection requests. 默认值为 10。The default is 10.

例外

该值不能小于零。The value cannot be less than zero.

示例

此示例演示如何获取 ListenBacklog 值。This example shows how to get the ListenBacklog value.

int listenBacklog = binding.ListenBacklog;

注解

ListenBacklog 是套接字级别的属性,描述要排队的“挂起接受”请求数。ListenBacklog is a socket-level property that describes the number of "pending accept" requests to be queued. 如果侦听积压工作 (backlog) 队列已满,则会拒绝新的套接字请求。If the listen backlog queue fills up, new socket requests will be rejected.

适用于