Class CloseEventArgs
Represents the event data for the OnClose event.
Inheritance
System.Object
System.EventArgs
CloseEventArgs
Inherited Members
System.EventArgs.Empty
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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
| Improve this Doc View SourceCode
Gets the status code for the close.
Declaration
public ushort Code { get; }
Property Value
Type | Description |
---|---|
System.UInt16 | A System.UInt16 that represents the status code for the close if any. |
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.
Reason
Gets the reason for the close.
Declaration
public string Reason { get; }
Property Value
Type | Description |
---|---|
System.String | A System.String that represents the reason for the close if any. |
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.
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 .
|
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.