Class CloseEventArgs
Represents the event data for the OnClose event.
Inheritance
EventArgs
CloseEventArgs
Namespace: Mars.Common.Socket
Assembly: Mars.Common.dll
Syntax
public class CloseEventArgs : EventArgs
Remarks
That event occurs when the WebSocket connection has been closed.
If you would like to get the reason for the close, you should access the Code or Reason property.
Properties
Code
Gets the status code for the close.
Declaration
public ushort Code { get; }
Property Value
Type | Description |
---|---|
System.UInt16 |
A |
Reason
Gets the reason for the close.
Declaration
public string Reason { get; }
Property Value
Type | Description |
---|---|
System.String |
A |
WasClean
Gets a value indicating whether the connection has been closed cleanly.
Declaration
public bool WasClean { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
true if the connection has been closed cleanly; otherwise, false .
|