@showbridge/lib
Version:
Main library for showbridge protocol router
27 lines (26 loc) • 1.03 kB
TypeScript
import { Application } from 'express';
import { IncomingMessage, Server, ServerResponse } from 'http';
import { WebSocket, WebSocketServer } from 'ws';
import { HTTPProtocolParams } from '@showbridge/types/dist/models/params/protocols.js';
import Protocol from './protocol.js';
declare class HTTPProtocol extends Protocol<HTTPProtocolParams> {
app: Application;
httpServer: Server<typeof IncomingMessage, typeof ServerResponse>;
wsServer: WebSocketServer;
webUISockets: WebSocket[];
openWebSockets: WebSocket[];
server: Server<typeof IncomingMessage, typeof ServerResponse>;
constructor(protocolObj: any, router: any);
setupWebSocket(): void;
servePath(filePath: any): void;
reload(params: any): void;
sendToWebUISockets(eventName: string, data: any): void;
send(url: string, method: string, body: any, contentType: string): void;
stop(): void;
get status(): {
enabled: boolean;
listening: boolean;
address: {};
};
}
export default HTTPProtocol;