This commit is contained in:
地平线
2015-06-27 10:27:01 +08:00
parent 75383b8515
commit 1fb1d17f52
2 changed files with 8 additions and 0 deletions

View File

@@ -115,6 +115,10 @@ public abstract class WebSocket {
return engine.getWebSocketGroup(groupid);
}
protected final Collection<WebSocketGroup> getWebSocketGroups() {
return engine.getWebSocketGroups();
}
//-------------------------------------------------------------------
/**
* 返回sessionid, null表示连接不合法或异常

View File

@@ -49,6 +49,10 @@ public final class WebSocketEngine {
if (group.isEmpty()) containers.remove(socket.groupid);
}
Collection<WebSocketGroup> getWebSocketGroups() {
return containers.values();
}
public WebSocketGroup getWebSocketGroup(Serializable groupid) {
return containers.get(groupid);
}