UNPKG

@loopback/socketio

Version:

LoopBack's WebSocket server based on socket.io

11 lines (10 loc) 647 B
import { Context, ControllerClass } from '@loopback/core'; import { HttpServerOptions } from '@loopback/http-server'; export type SocketIoOptions = HttpServerOptions; export interface SocketIoSequence { handle(methodName: string, args: unknown[], done: Function): Promise<void>; } export type SocketIoDoneFunction = (response: unknown) => Promise<void>; export type SocketIoInvokeMethod = (context: Context, controller: ControllerClass, methodName: string, args: unknown[]) => unknown; export type SocketIoSendMethod = (done: Function, result: unknown) => unknown; export type SocketIoRejectMethod = (done: Function, error: Error) => unknown;