The W3C specification for the WebSocket API says that when sending a WebSocket message, it is necessary to send an event message":
When a WebSocket message is received with data type and data, the user agent must queue the task to perform the following actions:
...
- ,
MessageEvent, message, , .
...
WebSocket.
, " WebSocket", RFC 6455, " WebSocket" . WebSockets , :
, , "". .
, 6 RFC 6455, " WebSocket":
( 5.4), , _A WebSocket Message Has Been Received_ // //. , " " /data/. , FIN (frame-fin), , _A WebSocket //...
, send "", , message.
API- , (, FIN , - finish), message , .