Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 18.226.52.206
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : transport.d.ts
import { EventEmitter } from "events";
import type { IncomingMessage, ServerResponse } from "http";
import { Packet, RawData } from "engine.io-parser";
type ReadyState = "open" | "closing" | "closed";
export type EngineRequest = IncomingMessage & {
    _query: Record<string, string>;
    res?: ServerResponse;
    cleanup?: Function;
    websocket?: any;
};
export declare abstract class Transport extends EventEmitter {
    /**
     * The session ID.
     */
    sid: string;
    /**
     * Whether the transport is currently ready to send packets.
     */
    writable: boolean;
    /**
     * The revision of the protocol:
     *
     * - 3 is used in Engine.IO v3 / Socket.IO v2
     * - 4 is used in Engine.IO v4 and above / Socket.IO v3 and above
     *
     * It is found in the `EIO` query parameters of the HTTP requests.
     *
     * @see https://github.com/socketio/engine.io-protocol
     */
    protocol: number;
    /**
     * The current state of the transport.
     * @protected
     */
    protected _readyState: ReadyState;
    /**
     * Whether the transport is discarded and can be safely closed (used during upgrade).
     * @protected
     */
    protected discarded: boolean;
    /**
     * The parser to use (depends on the revision of the {@link Transport#protocol}.
     * @protected
     */
    protected parser: any;
    /**
     * Whether the transport supports binary payloads (else it will be base64-encoded)
     * @protected
     */
    protected supportsBinary: boolean;
    get readyState(): ReadyState;
    set readyState(state: ReadyState);
    /**
     * Transport constructor.
     *
     * @param {EngineRequest} req
     */
    constructor(req: {
        _query: Record<string, string>;
    });
    /**
     * Flags the transport as discarded.
     *
     * @package
     */
    discard(): void;
    /**
     * Called with an incoming HTTP request.
     *
     * @param req
     * @package
     */
    onRequest(req: any): void;
    /**
     * Closes the transport.
     *
     * @package
     */
    close(fn?: () => void): void;
    /**
     * Called with a transport error.
     *
     * @param {String} msg - message error
     * @param {Object} desc - error description
     * @protected
     */
    protected onError(msg: string, desc?: any): void;
    /**
     * Called with parsed out a packets from the data stream.
     *
     * @param {Object} packet
     * @protected
     */
    protected onPacket(packet: Packet): void;
    /**
     * Called with the encoded packet data.
     *
     * @param {String} data
     * @protected
     */
    protected onData(data: RawData): void;
    /**
     * Called upon transport close.
     *
     * @protected
     */
    protected onClose(): void;
    /**
     * The name of the transport.
     */
    abstract get name(): string;
    /**
     * Sends an array of packets.
     *
     * @param {Array} packets
     * @package
     */
    abstract send(packets: Packet[]): void;
    /**
     * Closes the transport.
     */
    abstract doClose(fn?: () => void): void;
}
export {};
© 2025 GrazzMean-Shell