| 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); |