45
45
- [ websocket.url] ( #websocketurl )
46
46
- [ WebSocket.createWebSocketStream(websocket[ , options] )] ( #websocketcreatewebsocketstreamwebsocket-options )
47
47
- [ WS Error Codes] ( #ws-error-codes )
48
- - [ WS_ERR_UNSUPPORTED_MESSAGE_LENGTH] ( #wserrunsupporteddatapayloadlength )
49
- - [ WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH] ( #wserrunsupporteddatapayloadlength )
48
+ - [ WS_ERR_EXPECTED_FIN] ( #wserrexpectedfin )
49
+ - [ WS_ERR_EXPECTED_MASK] ( #wserrexpectedmask )
50
+ - [ WS_ERR_INVALID_CLOSE_CODE] ( #wserrinvalidclosecode )
50
51
- [ WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH] ( #wserrinvalidcontrolpayloadlength )
51
- - [ WS_ERR_INVALID_UTF8] ( #wserrinvalidutf8 )
52
52
- [ WS_ERR_INVALID_OPCODE] ( #wserrinvalidopcode )
53
- - [ WS_ERR_INVALID_CLOSE_CODE] ( #wserrinvalidclosecode )
53
+ - [ WS_ERR_INVALID_UTF8] ( #wserrinvalidutf8 )
54
+ - [ WS_ERR_UNEXPECTED_MASK] ( #wserrunexpectedmask )
54
55
- [ WS_ERR_UNEXPECTED_RSV_1] ( #wserrunexpectedrsv1 )
55
56
- [ WS_ERR_UNEXPECTED_RSV_2_3] ( #wserrunexpectedrsv23 )
56
- - [ WS_ERR_EXPECTED_FIN] ( #wserrexpectedfin )
57
- - [ WS_ERR_EXPECTED_MASK] ( #wserrexpectedmask )
58
- - [ WS_ERR_UNEXPECTED_MASK] ( #wserrunexpectedmask )
57
+ - [ WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH] ( #wserrunsupporteddatapayloadlength )
58
+ - [ WS_ERR_UNSUPPORTED_MESSAGE_LENGTH] ( #wserrunsupporteddatapayloadlength )
59
59
60
60
## Class: WebSocket.Server
61
61
@@ -511,31 +511,33 @@ given `WebSocket`.
511
511
Errors emitted by the websocket may have a ` .code ` property, describing the
512
512
specific type of error that has occurred:
513
513
514
- ### WS_ERR_UNSUPPORTED_MESSAGE_LENGTH
514
+ ### WS_ERR_EXPECTED_FIN
515
515
516
- A message was received with a length longer than the maximum supported length,
517
- as configured by the ` maxPayload ` option.
516
+ A WebSocket frame was received with the FIN bit not set when it was expected.
518
517
519
- ### WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH
518
+ ### WS_ERR_EXPECTED_MASK
520
519
521
- A data frame was received with a length longer the max supported length (2^53-1,
522
- due to JavaScript language limitations).
520
+ An unmasked WebSocket frame was received by a WebSocket server.
523
521
524
- ### WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH
522
+ ### WS_ERR_INVALID_CLOSE_CODE
525
523
526
- A control frame with an invalid payload length was received .
524
+ A WebSocket close frame was received with an invalid close code .
527
525
528
- ### WS_ERR_INVALID_UTF8
526
+ ### WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH
529
527
530
- A text or close frame was received containing invalid UTF-8 data .
528
+ A control frame with an invalid payload length was received .
531
529
532
530
### WS_ERR_INVALID_OPCODE
533
531
534
532
A WebSocket frame was received with an invalid opcode.
535
533
536
- ### WS_ERR_INVALID_CLOSE_CODE
534
+ ### WS_ERR_INVALID_UTF8
537
535
538
- A WebSocket close frame was received with an invalid close code.
536
+ A text or close frame was received containing invalid UTF-8 data.
537
+
538
+ ### WS_ERR_UNEXPECTED_MASK
539
+
540
+ A masked WebSocket frame was received by a WebSocket client.
539
541
540
542
### WS_ERR_UNEXPECTED_RSV_1
541
543
@@ -545,17 +547,15 @@ A WebSocket frame was received with the RSV1 bit set unexpectedly.
545
547
546
548
A WebSocket frame was received with the RSV2 or RSV3 bit set unexpectedly.
547
549
548
- ### WS_ERR_EXPECTED_FIN
549
-
550
- A WebSocket frame was received with the FIN bit not set when it was expected.
551
-
552
- ### WS_ERR_EXPECTED_MASK
550
+ ### WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH
553
551
554
- An unmasked WebSocket frame was received by a WebSocket server.
552
+ A data frame was received with a length longer the max supported length (2^53-1,
553
+ due to JavaScript language limitations).
555
554
556
- ### WS_ERR_UNEXPECTED_MASK
555
+ ### WS_ERR_UNSUPPORTED_MESSAGE_LENGTH
557
556
558
- A masked WebSocket frame was received by a WebSocket client.
557
+ A message was received with a length longer than the maximum supported length,
558
+ as configured by the ` maxPayload ` option.
559
559
560
560
[ concurrency-limit ] : https://github.com/websockets/ws/issues/1202
561
561
[ duplex-options] :
0 commit comments