語言

StreamSocket.Control 屬性

定義

取得 StreamSocket 物件上的 socket 控制資料。

public:
 property StreamSocketControl ^ Control { StreamSocketControl ^ get(); };
StreamSocketControl Control();
public StreamSocketControl Control { get; }
var streamSocketControl = streamSocket.control;
Public ReadOnly Property Control As StreamSocketControl

屬性值

StreamSocket 物件上的 socket 控制資料。

備註

Control 屬性會取得與 StreamSocket 物件相關的 StreamSocketControl 實例。

StreamSocketControl 物件會自動建立,使用父 StreamSocket 物件。 接著可以使用 StreamSocketControl 實例來取得或設定 StreamSocket 物件所使用的控制資料。 StreamSocketControl 實例上的這些屬性包括以下幾項:

對於 StreamSocketControl 屬性值的任何變更,都必須在連接 StreamSocket 前設定。 因此,如果你需要對 IgnorableServerCertificateErrors、KeepAlive、NoDelay、OutboundBufferSizeInBytes、OutboundUnicastHopLimit 或 QualityOfService 屬性做變更,這些變更必須在成功呼叫 StreamSocket 上的 ConnectAsync 方法之前完成。

適用於

另請參閱