WebSocketClosedEventArgs.Code Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets information about the reason that a WebSocket object was closed.
public:
property unsigned short Code { unsigned short get(); };
uint16_t Code();
public ushort Code { get; }
var uInt16 = webSocketClosedEventArgs.code;
Public ReadOnly Property Code As UShort
Property Value
Status code indicating the reason for closure.
Remarks
Status codes in the range 0-999 are not used.
Status codes in the range 1000-2999 are reserved for definition by the WebSocket protocol.
Status codes in the range 3000-3999 are reserved for use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol.
Status codes in the range 4000-4999 are reserved for private use and cannot be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol.