ServerMessageWebSocket クラス

定義

Web サーバーが所有する WebSocket オブジェクトを使用してメッセージ全体を読み書きできるネットワーク通信をサポートします。 任意の WebSocket 接続に登録することはできません。代わりに、 ServerMessageWebSocket のインスタンスは、 Windows デバイス ポータル (WDP) などのシステム コードによって作成されます。

public ref class ServerMessageWebSocket 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 ServerMessageWebSocket 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 ServerMessageWebSocket : System.IDisposable
Public NotInheritable Class ServerMessageWebSocket
Implements IDisposable
継承
Object Platform::Object IInspectable ServerMessageWebSocket
属性
実装

Windows の要件

デバイス ファミリ
Windows 10, version 1803 (10.0.17134.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v6.0 で導入)
アプリの機能
internetClientServer privateNetworkClientServer

プロパティ

Control

ServerMessageWebSocket オブジェクトのソケット コントロール データを取得します。

Information

ServerMessageWebSocket オブジェクトのソケット情報を取得します。

OutputStream

ServerMessageWebSocket オブジェクトのリモート ネットワーク宛先に書き込む出力ストリームを取得します。

メソッド

Close()

ServerMessageWebSocket オブジェクトを閉じ、空の閉じるフレームをサーバーに送信します。

Close(UInt16, String)

ServerMessageWebSocket オブジェクトを閉じ、閉じる理由を示します。

Dispose()

アンマネージ リソースの解放またはリセットに関連付けられているアプリケーション定義のタスクを実行します。

イベント

Closed

閉じるハンドシェイクの一部として ServerMessageWebSocket オブジェクトで閉じるフレームを受信したときに発生します。

MessageReceived

ServerMessageWebSocket オブジェクトでメッセージが受信されたことを示すイベント。

適用対象

こちらもご覧ください