import { ExtHostManagedSocketsShape } from "./extHost.protocol.js"; import * as vscode from "vscode"; import { IExtHostRpcService } from "./extHostRpcService.js"; import { VSBuffer } from "../../../base/common/buffer.js"; export interface IExtHostManagedSockets extends ExtHostManagedSocketsShape { setFactory(socketFactoryId: number, makeConnection: () => Thenable): void; /** * Opens a managed connection in-process using the currently registered * factory. Used by consumers that live inside the extension host (e.g. the * browser tunnel proxy). There is only ever one active remote per window, so * the latest factory is the correct one to dial; this avoids depending on a * factory id that can lag connection-data updates by a renderer round-trip. */ makeConnection(): Promise; readonly _serviceBrand: undefined; } export declare const IExtHostManagedSockets: import("../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; export declare class ExtHostManagedSockets implements IExtHostManagedSockets { readonly _serviceBrand: undefined; private readonly _proxy; private _remoteSocketIdCounter; private _factory; private readonly _managedRemoteSockets; constructor(extHostRpc: IExtHostRpcService); setFactory(socketFactoryId: number, makeConnection: () => Thenable): void; makeConnection(): Promise; $openRemoteSocket(socketFactoryId: number): Promise; $remoteSocketWrite(socketId: number, buffer: VSBuffer): void; $remoteSocketEnd(socketId: number): void; $remoteSocketDrain(socketId: number): Promise; }