UNPKG

camstreamerlib

Version:

Helper library for CamStreamer ACAP applications.

22 lines (21 loc) 681 B
/// <reference types="node" /> /// <reference types="node" /> import http from 'http'; import EventEmitter from 'events'; export type HttpServerOptions = { host?: string; port?: number; }; type TOnRequestCallback = (req: http.IncomingMessage, res: http.ServerResponse) => void; export declare class HttpServer extends EventEmitter { private host; private port; private registeredPaths; private server; private sockets; constructor(options?: HttpServerOptions); getServer(): http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>; onRequest(pathName: string, callback: TOnRequestCallback): void; close(): void; } export {};