Page Contents
Home > @loopback/socketio > SocketIoServer > use
SocketIoServer.use() method
Register a sock.io middleware function
Signature:
use(fn: SockIOMiddleware): Server<import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, import("socket.io").DefaultEventsMap, any>;
Parameters
Parameter | Type | Description |
---|---|---|
fn | SockIOMiddleware |
Returns:
Server<import(“socket.io”).DefaultEventsMap, import(“socket.io”).DefaultEventsMap, import(“socket.io”).DefaultEventsMap, any>