(
ids: string[],
messageName: string,
messageData: object
)
| 376 | * @param eventData - Additional data to send with the event. |
| 377 | */ |
| 378 | export const sendDataTo = async ( |
| 379 | ids: string[], |
| 380 | messageName: string, |
| 381 | messageData: object |
| 382 | ) => { |
| 383 | if (!ids.length) return; |
| 384 | |
| 385 | const compressedData = await compressData(messageData); |
| 386 | |
| 387 | for (const id of ids) { |
| 388 | const connection = connections.get(id); |
| 389 | if (connection) { |
| 390 | connection.send({ |
| 391 | messageName, |
| 392 | data: compressedData, |
| 393 | }); |
| 394 | } |
| 395 | } |
| 396 | }; |
| 397 | |
| 398 | export const getAllMessagesMap = () => allMessages; |
| 399 |
nothing calls this directly
no test coverage detected