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, any> | 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, any>;
Parameters
Parameter | Type | Description |
---|---|---|
controllerClass | Constructor<object> | |
meta | SocketIoMetadata | string | RegExp | (Optional) |
Returns:
Server<import(“socket.io/dist/typed-events”).DefaultEventsMap, import(“socket.io/dist/typed-events”).DefaultEventsMap, import(“socket.io/dist/typed-events”).DefaultEventsMap, any> | 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, any>