StreamSocket.Control 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取 StreamSocket 对象上的套接字控制数据。
public:
property StreamSocketControl ^ Control { StreamSocketControl ^ get(); };
StreamSocketControl Control();
public StreamSocketControl Control { get; }
var streamSocketControl = streamSocket.control;
Public ReadOnly Property Control As StreamSocketControl
属性值
StreamSocket 对象上的套接字控制数据。
注解
Control 属性获取与 StreamSocket 对象关联的 StreamSocketControl 实例。
使用父 StreamSocket 对象自动创建 StreamSocketControl 对象。 然后, StreamSocketControl 实例可用于获取或设置 StreamSocket 对象使用的控件数据。 StreamSocketControl 实例上的这些属性包括:
- IgnorableServerCertificateErrors - 获取与 StreamSocket 对象建立 SSL 连接时要忽略的 SSL 服务器错误的向量。
- KeepAlive - 一个值,该值指示是否将保持活动数据包发送到 StreamSocket 对象的远程目标。
- NoDelay - 一个值,该值指示是否在 StreamSocket 对象上使用 Nagle 算法。
- OutboundUnicastHopLimit - StreamSocket 对象发送到单播 IP 地址的出站数据包的跃点限制。
- OutboundBufferSizeInBytes - 要用于在 StreamSocket 对象上发送数据的发送缓冲区的大小(以字节为单位)。
- QualityOfService - StreamSocket 对象上的服务质量。
在 StreamSocket 连接之前,必须设置对 StreamSocketControl 上的属性值所做的任何更改。 因此,如果需要更改 IgnorableServerCertificateErrors、KeepAlive、NoDelay、OutboundBufferSizeInBytes、OutboundUnicastHopLimit 或 QualityOfService 属性,则必须在成功调用 StreamSocket 上的某个 ConnectAsync 方法之前进行这些更改。