@amadeus-it-group/kassette
Version:
Development server, used mainly for testing, which proxies requests and is able to easily manage local mocks.
11 lines (10 loc) • 815 B
TypeScript
import { ServerHttp2Stream } from 'http2';
import { Socket } from 'net';
import { URL } from 'url';
import { Connection } from './request';
export declare const connectionToURL: (address: Connection) => URL;
export declare const pushSocketConnection: (socket: Socket | ServerHttp2Stream, hostname: string, port: number, protocol: string) => void;
export declare const setConnectionProtocol: (socket: Socket | ServerHttp2Stream, protocol: string) => void;
export declare const forwardSocketConnections: (parentSocket: Socket | ServerHttp2Stream, childSocket: Socket | ServerHttp2Stream) => void;
export declare const getSocketConnections: (socket: Socket | ServerHttp2Stream) => readonly Readonly<Connection>[];
export declare const getSocketConnection: (socket: Socket | ServerHttp2Stream) => Readonly<Connection>;