Enumeration Case

NSURLSessionWebSocketCloseCodePolicyViolation

A code that indicates an endpoint terminated the connection because it received a message that violates its policy.

Declaration

NSURLSessionWebSocketCloseCodePolicyViolation = 1008

Discussion

This is a generic code for use when a more specific code is unavailable.

See Also

Close Codes

NSURLSessionWebSocketCloseCodeAbnormalClosure

A reserved code that indicates the connection closed without a close control frame.

NSURLSessionWebSocketCloseCodeGoingAway

A code that indicates an endpoint is going away.

NSURLSessionWebSocketCloseCodeInternalServerError

A code that indicates the server terminated the connection because it encountered an unexpected condition.

NSURLSessionWebSocketCloseCodeInvalid

A code that indicates the connection is still open.

NSURLSessionWebSocketCloseCodeInvalidFramePayloadData

A code that indicates the server terminated the connection because it received data inconsistent with the message’s type.

NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing

A code that indicates the client terminated the connection because the server didn’t negotiate a required extension.

NSURLSessionWebSocketCloseCodeMessageTooBig

A code that indicates an endpoint is terminating the connection because it received a message too big for it to process.

NSURLSessionWebSocketCloseCodeNoStatusReceived

A reserved code that indicates an endpoint expected a status code and didn’t receive one.

NSURLSessionWebSocketCloseCodeNormalClosure

A code that indicates normal connection closure.

NSURLSessionWebSocketCloseCodeProtocolError

A code that indicates an endpoint terminated the connection due to a protocol error.

NSURLSessionWebSocketCloseCodeTLSHandshakeFailure

A reserved code that indicates the connection closed due to the failure to perform a TLS handshake.

NSURLSessionWebSocketCloseCodeUnsupportedData

A code that indicates an endpoint terminated the connection after receiving a type of data it can’t accept.