mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 22:16:08 +00:00
fix: unused properties
This commit is contained in:
parent
966a157547
commit
2c69e1cb41
@ -14,7 +14,7 @@ export class BaseSocket {
|
|||||||
this.ping = ws.waitPing.bind(ws);
|
this.ping = ws.waitPing.bind(ws);
|
||||||
ws.onpong = data => {
|
ws.onpong = data => {
|
||||||
const promise = ws.__promises.get(data);
|
const promise = ws.__promises.get(data);
|
||||||
if (data) {
|
if (promise) {
|
||||||
ws.__promises.delete(data);
|
ws.__promises.delete(data);
|
||||||
promise?.resolve();
|
promise?.resolve();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { randomBytes, createHash, randomUUID } from 'node:crypto';
|
import { randomBytes, createHash, randomUUID } from 'node:crypto';
|
||||||
import { request } from 'node:https';
|
import { request } from 'node:https';
|
||||||
import type { Socket } from 'node:net';
|
import type { Socket } from 'node:net';
|
||||||
import { createInflate, inflateSync } from 'node:zlib';
|
import { inflateSync } from 'node:zlib';
|
||||||
|
|
||||||
export class SeyfertWebSocket {
|
export class SeyfertWebSocket {
|
||||||
socket?: Socket = undefined;
|
socket?: Socket = undefined;
|
||||||
@ -9,7 +9,6 @@ export class SeyfertWebSocket {
|
|||||||
path: string;
|
path: string;
|
||||||
__stored: Buffer[] = [];
|
__stored: Buffer[] = [];
|
||||||
__opcode = 0;
|
__opcode = 0;
|
||||||
__body: Buffer[] = [];
|
|
||||||
__promises = new Map<
|
__promises = new Map<
|
||||||
string,
|
string,
|
||||||
{
|
{
|
||||||
@ -17,7 +16,6 @@ export class SeyfertWebSocket {
|
|||||||
reject: (reason?: any) => void;
|
reject: (reason?: any) => void;
|
||||||
}
|
}
|
||||||
>();
|
>();
|
||||||
__zlib?: ReturnType<typeof createInflate>;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
url: string,
|
url: string,
|
||||||
@ -26,9 +24,6 @@ export class SeyfertWebSocket {
|
|||||||
const urlParts = new URL(url);
|
const urlParts = new URL(url);
|
||||||
this.hostname = urlParts.hostname || '';
|
this.hostname = urlParts.hostname || '';
|
||||||
this.path = `${urlParts.pathname}${urlParts.search || ''}&encoding=json`;
|
this.path = `${urlParts.pathname}${urlParts.search || ''}&encoding=json`;
|
||||||
if (compress) {
|
|
||||||
this.__zlib = createInflate();
|
|
||||||
}
|
|
||||||
this.connect();
|
this.connect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user