MCPcopy Create free account
hub / github.com/BaseXdb/basex / broadcast

Method broadcast

basex-api/src/main/java/org/basex/http/ws/WsPool.java:76–82  ·  view source on GitHub ↗

Sends a message to all connected clients except to the one with the given ID. @param message message @param client client ID @throws QueryException query exception

(final Item message, final String client)

Source from the content-addressed store, hash-verified

74 * @throws QueryException query exception
75 */
76 public static void broadcast(final Item message, final String client) throws QueryException {
77 final List<WebSocket> list = new ArrayList<>();
78 for(final Entry<String, WebSocket> entry : CLIENTS.entrySet()) {
79 if(!client.equals(entry.getKey())) list.add(entry.getValue());
80 }
81 send(message, list);
82 }
83
84 /**
85 * Sends a message to a specific clients.

Callers 1

itemMethod · 0.95

Calls 5

sendMethod · 0.95
getKeyMethod · 0.80
addMethod · 0.65
equalsMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected