2. æ¦è¦ ä¸å¦çãè¦ãã¦ã§ãã½ã±ãã ã¦ã§ãã½ã±ããã¡ãã¼ç°¡åãããw § ¦ § ¤ var ws = new WebSocket ( "ws://localhost:8080/echo" ) ; ws . onmessage = f u n c t i o n ( e ) { console . log ( e . data ) ; }; Â¥ ¤ var WebSocketServer = r e q u i r e ( 'ws' ) . Server , wss = new WebSocketServer ( { port : 8080}) ; wss . on ( 'connection' , f u n c t i o n ( ws ) { ws . on ( 'message' , f u n c t i o n ( message ) { console . log ( '
{{#tags}}- {{label}}
{{/tags}}