mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 10:57:04 -04:00
16 lines
414 B
TypeScript
16 lines
414 B
TypeScript
/*
|
|
* Vencord, a Discord client mod
|
|
* Copyright (c) 2023 Vendicated and contributors
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
import { createSocket, Socket } from "dgram";
|
|
|
|
let xsoSocket: Socket;
|
|
|
|
export function sendToOverlay(_, data: any) {
|
|
data.messageType = data.type;
|
|
const json = JSON.stringify(data);
|
|
xsoSocket ??= createSocket("udp4");
|
|
xsoSocket.send(json, 42069, "127.0.0.1");
|
|
}
|