libhyperproxy/dist/proxies/multiSocket/tcpSocket.d.ts

21 lines
689 B
TypeScript
Raw Normal View History

2023-04-15 22:40:09 +00:00
/// <reference types="node" />
2023-04-16 02:17:57 +00:00
import { Callback } from "streamx";
2023-04-15 22:40:09 +00:00
import { TcpSocketConnectOpts } from "net";
import MultiSocketProxy from "../multiSocket.js";
import { PeerEntity } from "./types.js";
2023-04-16 02:17:57 +00:00
import BaseSocket from "../../socket.js";
export default class TcpSocket extends BaseSocket {
2023-04-15 22:40:09 +00:00
private _options;
private _id;
private _remoteId;
private _proxy;
private _socket?;
constructor(id: number, remoteId: number, manager: MultiSocketProxy, peer: PeerEntity, options: TcpSocketConnectOpts);
private _peer;
get peer(): any;
_write(data: any, cb: any): void;
_destroy(cb: Callback): void;
connect(): void;
private _getSocketRequest;
}