Aller au contenu principal
Version: Next

@midwayjs/ws

Index

Type Aliases

Application

IMidwayWSApplication

IMidwayWSApplication: IMidwayApplication<IMidwayWSContext, { getConnectionMiddleware: ContextMiddlewareManager<Context, NextFunction, undefined>; onWebSocketUpgrade: (handler: UpgradeAuthHandler | null) => void; useConnectionMiddleware: (middleware: CommonMiddlewareUnion<Context, NextFunction, undefined>) => void }> & WebSocket.Server

IMidwayWSConfigurationOptions

IMidwayWSConfigurationOptions: { enableServerHeartbeatCheck?: boolean; pubClient?: any; serverHeartbeatInterval?: number; subClient?: any } & Partial<WebSocket.ServerOptions> & IConfigurationOptions

IMidwayWSContext

IMidwayWSContext: IMidwayContext<WebSocket & { app: IMidwayWSApplication; isAlive: boolean; request: IncomingMessage }>

NextFunction

NextFunction: BaseNextFunction

UpgradeAuthHandler

UpgradeAuthHandler: (request: IncomingMessage, socket: any, head: Buffer) => Promise<boolean>