CloseEventInit Class

The initialization dictionary of a CloseEvent (https://websockets.spec.whatwg.org/#dictdef-closeeventinit).

public sealed class CloseEventInit : EventInit
Inheritance
EventInit CloseEventInit

Constructors

NameDescription
CloseEventInit()

CloseEventInit()

CloseEvent.cs
public CloseEventInit()

No documentation is available.

Properties

NameDescription
CodeGets the WebSocket connection close code.
ReasonGets the WebSocket connection close reason.
WasCleanGets whether the connection closed cleanly.

Gets the WebSocket connection close code.

public ushort Code { get; init; }

Gets the WebSocket connection close reason.

public string Reason { get; init; }

Gets whether the connection closed cleanly.

public bool WasClean { get; init; }