ServerMessageWebSocket.Close 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Close() |
關閉 ServerMessageWebSocket 物件,並將空的關閉框架傳送至伺服器。 |
Close(UInt16, String) |
關閉 ServerMessageWebSocket 物件,並指出關閉的原因。 |
Close()
關閉 ServerMessageWebSocket 物件,並將空的關閉框架傳送至伺服器。
public:
virtual void Close() = Close;
void Close();
// This member is not implemented in C#
function close()
' This member is not implemented in VB.NET
實作
M:Windows.Foundation.IClosable.Close
M:System.IDisposable.Close
Windows 需求
應用程式功能 |
internetClientServer
privateNetworkClientServer
|
適用於
Close(UInt16, String)
關閉 ServerMessageWebSocket 物件,並指出關閉的原因。
public:
virtual void Close(unsigned short code, Platform::String ^ reason) = Close;
/// [Windows.Foundation.Metadata.Overload("CloseWithStatus")]
void Close(uint16_t const& code, winrt::hstring const& reason);
[Windows.Foundation.Metadata.Overload("CloseWithStatus")]
public void Close(ushort code, string reason);
function close(code, reason)
Public Sub Close (code As UShort, reason As String)
參數
- code
-
UInt16
unsigned short
uint16_t
指出關閉原因的狀態碼。 適當的程式代碼清單位於 IANA (網際網路指派號碼授權單位) WebSocket 通訊協定 登錄 ,也會記載在 MDN上。
- reason
-
String
Platform::String
winrt::hstring
選擇性的 UTF-8 編碼資料,以及有關關閉的其他資訊。
- 屬性
Windows 需求
應用程式功能 |
internetClientServer
privateNetworkClientServer
|