MCPcopy Create free account
hub / github.com/e2wugui/zeze / broadcast

Method broadcast

ZezeJava/ZezeJava/src/main/java/Zeze/Arch/Online.java:1494–1503  ·  view source on GitHub ↗
(long typeId, @NotNull Binary fullEncodedProtocol, int time, boolean onlySameVersion)

Source from the content-addressed store, hash-verified

1492 }
1493
1494 private int broadcast(long typeId, @NotNull Binary fullEncodedProtocol, int time, boolean onlySameVersion) {
1495 var broadcast = new Broadcast(new BBroadcast.Data(typeId, fullEncodedProtocol, time, onlySameVersion));
1496 var pdata = broadcast.encode();
1497 int sendCount = 0;
1498 for (var link : providerApp.providerService.getLinks().values()) {
1499 if (link.getSocket() != null && link.getSocket().Send(pdata))
1500 sendCount++;
1501 }
1502 return sendCount;
1503 }
1504
1505 public int broadcast(@NotNull Protocol<?> p) {
1506 return broadcast(p, 60 * 1000, false);

Callers 2

mainMethod · 0.45
onOpenMethod · 0.45

Calls 9

canLogProtocolMethod · 0.95
logMethod · 0.95
getLinksMethod · 0.80
encodeMethod · 0.65
valuesMethod · 0.65
getTypeIdMethod · 0.65
sizeMethod · 0.65
getSocketMethod · 0.45
SendMethod · 0.45

Tested by 2

mainMethod · 0.36
onOpenMethod · 0.36