UNPKG

@appsensorlike/appsensorlike

Version:

A port of OWASP AppSensor reference implementation

38 lines (37 loc) 1.25 kB
/// <reference types="node" resolution-mode="require"/> /// <reference types="node" resolution-mode="require"/> /// <reference types="node" resolution-mode="require"/> /// <reference types="node" resolution-mode="require"/> import net from 'net'; import http from 'http'; import https from 'https'; import http2 from 'http2'; declare enum HTTP_PROTOCOLS { HTTP = "http", HTTPS = "https", HTTP2 = "http2" } /** * Http/s/2 server and listen configuration */ declare class HttpS2ServerConfig { protocol: HTTP_PROTOCOLS; http?: http.ServerOptions | undefined; https?: https.ServerOptions | undefined; http2?: http2.ServerOptions | undefined; listenOptions?: net.ListenOptions | undefined; } /** * Creates Http/s/2 server and listen for connection according to * provided HttpS2ServerConfig configuration */ declare class HttpS2Server { protected server: http.Server | https.Server | http2.Http2Server | null; protected getConfiguration(): HttpS2ServerConfig; startServer(): Promise<void>; protected getAddress(): string; protected attachToServer(): Promise<void>; private instanceofAddressInfo; stopServer(): Promise<void>; } export { HTTP_PROTOCOLS, HttpS2ServerConfig, HttpS2Server };