Page Contents

Home > @loopback/socketio > SocketIoServer > route

SocketIoServer.route() method

Register a socketio controller

Signature:

route(controllerClass: Constructor<object>, meta?: SocketIoMetadata | string | RegExp): Server<import("socket.io/dist/typed-events").DefaultEventsMap, import("socket.io/dist/typed-events").DefaultEventsMap, import("socket.io/dist/typed-events").DefaultEventsMap> | import("socket.io").Namespace<import("socket.io/dist/typed-events").DefaultEventsMap, import("socket.io/dist/typed-events").DefaultEventsMap, import("socket.io/dist/typed-events").DefaultEventsMap>;

Parameters

Parameter Type Description
controllerClass Constructor<object>  
meta SocketIoMetadata | string | RegExp  

Returns:

Server<import(“socket.io/dist/typed-events”).DefaultEventsMap, import(“socket.io/dist/typed-events”).DefaultEventsMap, import(“socket.io/dist/typed-events”).DefaultEventsMap> | import(“socket.io”).Namespace<import(“socket.io/dist/typed-events”).DefaultEventsMap, import(“socket.io/dist/typed-events”).DefaultEventsMap, import(“socket.io/dist/typed-events”).DefaultEventsMap>