IWebSocket.Close(UInt16, String) 方法

定义

关闭 IWebSocket

public:
 void Close(unsigned short code, Platform::String ^ reason);
/// [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

指示关闭原因的状态代码。

reason
String

Platform::String

winrt::hstring

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

属性

适用于