WebSocketCloseInfo Class

  • Experimental (WEBPLATEXP0027)

The status code and the reason of the closing handshake of a WebSocketStream (https://whatpr.org/websockets/48.html#dictdef-websocketcloseinfo).

[Experimental("WEBPLATEXP0027", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public sealed class WebSocketCloseInfo

Constructors

NameDescription
WebSocketCloseInfo()

WebSocketCloseInfo()

WebSocketStream.cs
public WebSocketCloseInfo()

No documentation is available.

Properties

NameDescription
CloseCodeGets the status code, or null (a Close frame without status code, or 1000 when there is a reason).
ReasonGets the reason.

Gets the status code, or null (a Close frame without status code, or 1000 when there is a reason).

public ushort? CloseCode { get; init; }

Gets the reason.

public string Reason { get; init; }