Play Framework2ã®Scalaãµã³ãã«ã³ã¼ãã®websocket-chatã§ã¯Concurrent.brodacastã使ã£ã¦ 1 val (chatEnumerator, chatChannel) = Concurrent.broadcast[JsValue] ãã®chatChannelã«å¯¾ã㦠1 chatChannel.push(msg) ã¨ãããã¨ã§chatRoomã«æ¥ç¶ãã¦ããå ¨ã¦ã®ã¯ã©ã¤ã¢ã³ãã«å¯¾ãã¦ã¡ãã»ã¼ã¸ãéä¿¡ãã¦ãã¾ãã å ¨ã¦ã®ã¯ã©ã¤ã¢ã³ãã«åãã¡ãã»ã¼ã¸ãéãå ´åã¯Concurrent.broadcastã§ååã§ãããç¹å®ã®ã¯ã©ã¤ã¢ã³ãã«å¯¾ãã¦ã¡ãã»ã¼ã¸ãéãããå ´åã¯ã©ãããã°ããã§ããããã ã¨ããããå ¨å¡ã«ã¡ãã»ã¼ã¸ãéã£ã¦ãã¯ã©ã¤ã¢ã³ãã«èªåå®ã¦ã«éãããã¡ãã»ã¼ã¸ãã©ãããå¤æãã¦ãããã¨ãã解決æ¹æ³ãããã¾ãããç»åãªã©ãéãå ´åè² è·ã大ããã§
{{#tags}}- {{label}}
{{/tags}}