MCPcopy Index your code
hub / github.com/4ian/GDevelop / sendDataTo

Function sendDataTo

Extensions/Multiplayer/peerJsHelper.ts:378–396  ·  view source on GitHub ↗
(
      ids: string[],
      messageName: string,
      messageData: object
    )

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

compressDataFunction · 0.85
getMethod · 0.65
sendMethod · 0.45

Tested by

no test coverage detected