@theia/core
Version:
Theia is a cloud & desktop IDE framework implemented in TypeScript.
27 lines • 1.59 kB
TypeScript
import { MessagingService } from './messaging-service';
import * as http from 'http';
import * as https from 'https';
import { Socket } from 'socket.io';
import { WsRequestValidator } from '../ws-request-validators';
import { MessagingListener } from './messaging-listeners';
import { ConnectionHandlers } from './default-messaging-service';
import { BackendApplicationContribution } from '../backend-application';
import { ILogger } from '../../common/logger';
export declare class WebsocketEndpoint implements BackendApplicationContribution {
protected readonly wsRequestValidator: WsRequestValidator;
protected readonly messagingListener: MessagingListener;
protected readonly logger: ILogger;
protected checkAliveTimeout: number;
protected maxHttpBufferSize: number;
protected readonly wsHandlers: ConnectionHandlers<Socket<import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, any>>;
registerConnectionHandler(spec: string, callback: (params: MessagingService.PathParams, socket: Socket) => void): void;
onStart(server: http.Server | https.Server): void;
/**
* Secondary validation after connection. The primary check happens in the
* Socket.IO `allowRequest` callback at handshake time; this is kept as
* defense-in-depth in case a Socket.IO upgrade path bypasses `allowRequest`.
*/
protected allowConnect(request: http.IncomingMessage): Promise<boolean>;
protected handleConnection(socket: Socket): Promise<void>;
}
//# sourceMappingURL=websocket-endpoint.d.ts.map