Real-Time & Streaming

WebSocket Close Code

A numeric code sent in a WebSocket Close frame indicating the reason for disconnection, defined in RFC 6455. Common codes include 1000 (normal closure), 1001 (endpoint going away), 1006 (abnormal closure, set locally), 1008 (policy violation), 1011 (internal server error), and 4000-4999 (application-defined). The close frame may also include a UTF-8 reason string up to 123 bytes.

相关协议

另请参阅