/** * Copyright 2023 Angus.Fenying * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /// /// /// import type * as $Net from 'node:net'; import * as $Events from 'node:events'; import * as D from './Decl'; import { LwDFXEncoder } from './Encoder'; export declare abstract class AbstractConnection extends $Events.EventEmitter implements D.IConnection { private _timeout; protected readonly _enc: LwDFXEncoder; alpName: string; protected _socket: $Net.Socket | null; constructor(socket: $Net.Socket, _timeout: number); get timeout(): number; set timeout(v: number); get finished(): boolean; get ended(): boolean; get connected(): boolean; get writable(): boolean; get family(): string; get remoteAddress(): string; get localAddress(): string; get remotePort(): number; get localPort(): number; write(frameChunks: Buffer | string | Array): boolean; end(): boolean; destroy(): void; protected _setupSocket(): void; protected abstract _handshake(alpWhitelist: readonly string[], callback: D.IErrorCallback): void; protected _processHelloTailingChunk(helloPacketSize: number, chunk: Buffer): void; setup(alpWhitelist: readonly string[], handshakeTimeout: number, callback: D.IErrorCallback): void; } //# sourceMappingURL=AbstractConnection.d.ts.map