Share via


ServerStreamWebSocket 類別

定義

支援網路通訊,允許使用網頁伺服器所擁有的 WebSocket 物件來讀取和寫入資料流程。 您無法註冊任意 WebSocket 連線;相反地, ServerStreamWebSocket 的實例是由 Windows Device Portal (WDP) 之類的系統程式碼所建立。

public ref class ServerStreamWebSocket sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 393216)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ServerStreamWebSocket final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 393216)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ServerStreamWebSocket : System.IDisposable
Public NotInheritable Class ServerStreamWebSocket
Implements IDisposable
繼承
Object Platform::Object IInspectable ServerStreamWebSocket
屬性
實作

Windows 需求

裝置系列
Windows 10, version 1803 (已於 10.0.17134.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v6.0 引進)
應用程式功能
internetClientServer privateNetworkClientServer

屬性

Information

取得 ServerStreamWebSocket 物件的通訊端資訊。

InputStream

取得要從 ServerStreamWebSocket 物件上遠端目的地讀取的輸入資料流程。

OutputStream

取得輸出資料流程,以寫入 ServerStreamWebSocket 物件上的遠端網路目的地。

方法

Close()

關閉 ServerStreamWebSocket ,並將空的關閉框架傳送至伺服器。

Close(UInt16, String)

關閉 ServerStreamWebSocket 物件,並指出關閉的原因。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

事件

Closed

ServerStreamWebSocket 物件上收到關閉框架做為關閉交握的一部分時發生。

適用於

另請參閱