WebSocketsã®æ¥ç¶ç¶æ ã«ã¯ãCONNECTING / OPEN / CLOSING / CLOSEDã®ã¹ãã¼ããå®ãããã¦ããã ä¸æ¹ãCLOSINGç¶æ ã¸ã®é·ç§»ã«å¯¾å¿ããã¤ãã³ãã¯åå¨ãããCLOSEç¶æ ã¸é·ç§»ããéã«closeã¤ãã³ããçºçããã¨ããã¦ããã ã¤ã¾ãããcloseã¤ãã³ããæ¥ãã¾ã§ã¯éä¿¡ã§ãããã¼ãã£ã¦ãªã³ã¼ããæ¸ãã¦ãã¨ãæ£å¸¸ç³»ãªã®ã«send()ã§ä¾å¤çºçããå¯è½æ§ãããã ãªã®ã§ãé¢åã ãã©ã if (ws.readyState == 1) { ws.send(...); }ã®ãããªã¬ã¼ããå ¥ããå¿ è¦ããã*1ããããã¯ãws.readyState == CLOSING ç¶æ ã«ãªã£ããcloseã¤ãã³ãã®ãã³ãã©ãå¼ã³åºããããªã©ããã¼ãæ¸ãå¿ è¦ãããã ã¨ã以ä¸ã®çµè«ã«è³ã£ããã§ããããã£ã¦ã¾ãã§ããããï¼ãï¼èè 以ä¸ãè¦æ ¼ããã®å¼ç¨ã CONNECTI
{{#tags}}- {{label}}
{{/tags}}