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