ServerStreamWebSocket.Close 方法

定义

重载

Close()

关闭 ServerStreamWebSocket 并向服务器发送空的关闭帧。

Close(UInt16, String)

关闭 ServerStreamWebSocket 对象并指示关闭的原因。

Close()

关闭 ServerStreamWebSocket 并向服务器发送空的关闭帧。

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)

关闭 ServerStreamWebSocket 对象并指示关闭的原因。

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 (Internet 号码分配机构) WebSocket 协议 注册表 中,并且也记录在 MDN 上

reason
String

Platform::String

winrt::hstring

可选的 UTF-8 编码数据,其中包含有关闭包的其他信息。

属性

Windows 要求

应用功能
internetClientServer privateNetworkClientServer

适用于