0

I am about to build a small application based on websockets. I found this little library called java-websockets and if works just fine. My problem is now, that I have not found any way to identify clients and/or group them so that instead of broadcasting to all I can select a specific group to which I can send my notification. Would be great if anybody knows how to do it with this framework or knows any different framework which does the same it such an esay way. Thanks

Library: https://github.com/TooTallNate/Java-WebSocket

4

1 回答 1

1

您需要做的如下:

  1. 在服务器端指定组

  2. 如果仅用于服务器端触发,则创建与指定组的连接,或者将其传递给客户端并根据需要由客户端处理。

编辑:

刚刚尝试了一个“由客户端处理”的版本,请参阅在线演示github 上的项目和/或我博客上的相关文章

于 2013-07-14T09:54:56.547 回答