🧪 AirDCPP Socket scaffold

This commit is contained in:
2021-07-31 13:24:54 -07:00
parent ae5f0b2c0f
commit 802dee8857
3 changed files with 63 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
import { Socket } from "airdcpp-apisocket";
import WebSocket from "ws";
const options = {
url: "wss://sab.rishighan.com/api/v1/",
autoReconnect: false,
reconnectInterval: 5,
logLevel: "verbose",
ignoredListenerEvents: [
"transfer_statistics",
"hash_statistics",
"hub_counts_updated",
],
};
const APISocket = Socket(options, WebSocket as any);
type SocketType = typeof APISocket;
export { SocketType as APISocket };
export default APISocket;