feat: optimize event slow exec cache

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2022-11-28 17:14:29 +08:00
parent 597bdb721a
commit 72673b2a67
7 changed files with 38 additions and 20 deletions

View File

@ -2,7 +2,7 @@ import { EventEmitter } from "events"
import * as parser_v4 from "../engine.io-parser"
import * as parser_v3 from "./parser-v3"
// import debugModule from "debug"
import { IncomingMessage } from "http"
// import { IncomingMessage } from "http"
import { Packet } from "../engine.io-parser"
// const debug = debugModule("engine:transport")
@ -24,7 +24,8 @@ export abstract class Transport extends EventEmitter {
protected _readyState: string
protected discarded: boolean
protected parser: any
protected req: IncomingMessage & { cleanup: Function }
// protected req: IncomingMessage & { cleanup: Function }
protected req: { cleanup: Function }
protected supportsBinary: boolean
get readyState() {