CFx SDK Documentation  2023 SP0
Enumerations
CFxNAWebSocketProtocol Namespace Reference

Enumerations

enum  Version {
  VersionUnknown = -1 , Version0 = 0 , Version4 = 4 , Version5 = 5 ,
  Version6 = 6 , Version7 = 7 , Version8 = 8 , Version13 = 13 ,
  VersionLatest = Version13
}
 
enum  CloseCode {
  CloseCodeNormal = 1000 , CloseCodeGoingAway = 1001 , CloseCodeProtocolError = 1002 , CloseCodeDatatypeNotSupported = 1003 ,
  CloseCodeReserved1004 = 1004 , CloseCodeMissingStatusCode = 1005 , CloseCodeAbnormalDisconnection = 1006 , CloseCodeWrongDatatype = 1007 ,
  CloseCodePolicyViolated = 1008 , CloseCodeTooMuchData = 1009 , CloseCodeMissingExtension = 1010 , CloseCodeBadOperation = 1011 ,
  CloseCodeTlsHandshakeFailed = 1015
}
 

Enumeration Type Documentation

◆ CloseCode

This enum defines the close codes supported by WebSockets V13

Enumerator
CloseCodeNormal 

Normal closure.

CloseCodeGoingAway 

Going away.

CloseCodeProtocolError 

Protocol error.

CloseCodeDatatypeNotSupported 
CloseCodeReserved1004 

Unsupported data.

Reserved

CloseCodeMissingStatusCode 

No status received.

CloseCodeAbnormalDisconnection 

Abnormal closure.

CloseCodeWrongDatatype 

Invalid frame payload data.

CloseCodePolicyViolated 

Policy violation.

CloseCodeTooMuchData 

Message too big.

CloseCodeMissingExtension 

Mandatory extension missing.

CloseCodeBadOperation 

Internal server error.

CloseCodeTlsHandshakeFailed 

TLS handshake failed.

Definition at line 42 of file FxNAWebSocketProtocol.h.

◆ Version

Enumerator
VersionUnknown 

Unknown or unspecified version.

This enum defines the different defined versions of the WebSocket protocol.

Version0 

hixie76 and hybi-00. Works with key1, key2 and a key in the payload. Attribute: Sec-WebSocket-Draft value 0. Not supported by CFxNAWebSockets.

Version4 
Version5 

hybi-04. Changed handshake: key1, key2, key3 ==> Sec-WebSocket-Key, Sec-WebSocket-Nonce, Sec-WebSocket-Accept Sec-WebSocket-Draft renamed to Sec-WebSocket-Version Sec-WebSocket-Version = 4. Not supported by CFxNAWebSockets.

hybi-05. Sec-WebSocket-Version = 5 Removed Sec-WebSocket-Nonce Added Sec-WebSocket-Accept. Not supported by CFxNAWebSockets.

Version6 

Sec-WebSocket-Version = 6. Not supported by CFxNAWebSockets.

Version7 

hybi-07. Sec-WebSocket-Version = 7. Not supported by CFxNAWebSockets.

Version8 

hybi-8, hybi-9, hybi-10, hybi-11 and hybi-12. Status codes 1005 and 1006 are added and all codes are now unsigned Internal error results in 1006. Not supported by CFxNAWebSockets.

Version13 

hybi-13, hybi14, hybi-15, hybi-16, hybi-17 and RFC 6455. Sec-WebSocket-Version = 13 Status code 1004 is now reserved Added 1008, 1009 and 1010 Must support TLS Clarify multiple version support. Supported by CFxNAWebSockets.

VersionLatest 

Refers to the latest known version to CFxNAWebSockets.

Definition at line 21 of file FxNAWebSocketProtocol.h.