Page Contents

Home > @loopback/socketio > SocketIoServer > use

SocketIoServer.use() method

Register a sock.io middleware function

Signature:

use(fn: SockIOMiddleware): Server<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
fn SockIOMiddleware  

Returns:

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