🔌 Working UI integration airdcpp-socket

This commit is contained in:
2021-08-14 23:40:03 -07:00
parent a20da523b2
commit 7c8ee36505
4 changed files with 80 additions and 34 deletions

View File

@@ -0,0 +1,19 @@
import { Socket } from "airdcpp-apisocket";
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, window.WebSocket as any);
type SocketType = typeof APISocket;
export { SocketType as APISocket };
export default APISocket;