CloseReason.CloseCodes (Java(TM) EE 7 Specification APIs) (original) (raw)
Enum Constant and Description
[CANNOT_ACCEPT](../../javax/websocket/CloseReason.CloseCodes.html#CANNOT%5FACCEPT)
1003 indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message).
[CLOSED_ABNORMALLY](../../javax/websocket/CloseReason.CloseCodes.html#CLOSED%5FABNORMALLY)
1006 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint.
[GOING_AWAY](../../javax/websocket/CloseReason.CloseCodes.html#GOING%5FAWAY)
1001 indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page.
[NO_EXTENSION](../../javax/websocket/CloseReason.CloseCodes.html#NO%5FEXTENSION)
1010 indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake.
[NO_STATUS_CODE](../../javax/websocket/CloseReason.CloseCodes.html#NO%5FSTATUS%5FCODE)
1005 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint.
[NORMAL_CLOSURE](../../javax/websocket/CloseReason.CloseCodes.html#NORMAL%5FCLOSURE)
1000 indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled.
[NOT_CONSISTENT](../../javax/websocket/CloseReason.CloseCodes.html#NOT%5FCONSISTENT)
1007 indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 data within a text message).
[PROTOCOL_ERROR](../../javax/websocket/CloseReason.CloseCodes.html#PROTOCOL%5FERROR)
1002 indicates that an endpoint is terminating the connection due to a protocol error.
[RESERVED](../../javax/websocket/CloseReason.CloseCodes.html#RESERVED)
Reserved.
[SERVICE_RESTART](../../javax/websocket/CloseReason.CloseCodes.html#SERVICE%5FRESTART)
1012 indicates that the service will be restarted.
[TLS_HANDSHAKE_FAILURE](../../javax/websocket/CloseReason.CloseCodes.html#TLS%5FHANDSHAKE%5FFAILURE)
1015 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint.
[TOO_BIG](../../javax/websocket/CloseReason.CloseCodes.html#TOO%5FBIG)
1009 indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process.
[TRY_AGAIN_LATER](../../javax/websocket/CloseReason.CloseCodes.html#TRY%5FAGAIN%5FLATER)
1013 indicates that the service is experiencing overload
[UNEXPECTED_CONDITION](../../javax/websocket/CloseReason.CloseCodes.html#UNEXPECTED%5FCONDITION)
1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request.
[VIOLATED_POLICY](../../javax/websocket/CloseReason.CloseCodes.html#VIOLATED%5FPOLICY)
1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy.