Page Contents
Home > @loopback/socketio > SocketIoServer
SocketIoServer class
A socketio server
Signature:
export declare class SocketIoServer extends Context
Extends: Context
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| [(constructor)(app, options)](/doc/en/lb4/apidocs.socketio.socketioserver._constructor_.html) | Constructs a new instance of the `SocketIoServer` class |
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| [app](/doc/en/lb4/apidocs.socketio.socketioserver.app.html) | [Application](/doc/en/lb4/apidocs.core.application.html) | ||
| [config](/doc/en/lb4/apidocs.socketio.socketioserver.config.html) | `readonly` | [HttpServerResolvedOptions](/doc/en/lb4/apidocs.socketio.httpserverresolvedoptions.html) | |
| [listening](/doc/en/lb4/apidocs.socketio.socketioserver.listening.html) | `readonly` | boolean | |
| [options](/doc/en/lb4/apidocs.socketio.socketioserver.options.html) | `protected` | [SocketIoServerOptions](/doc/en/lb4/apidocs.socketio.socketioserveroptions.html) | |
| [url](/doc/en/lb4/apidocs.socketio.socketioserver.url.html) | `readonly` | string |
Methods
| Method | Modifiers | Description |
|---|---|---|
| [controller(controllerClass)](/doc/en/lb4/apidocs.socketio.socketioserver.controller.html) | Register a socket.io controller | |
| [discoverAndRegister()](/doc/en/lb4/apidocs.socketio.socketioserver.discoverandregister.html) | Discover all socket.io controllers and register routes | |
| [route(controllerClass, meta)](/doc/en/lb4/apidocs.socketio.socketioserver.route.html) | Register a socketio controller | |
| [start()](/doc/en/lb4/apidocs.socketio.socketioserver.start.html) | Start the socketio server | |
| [stop()](/doc/en/lb4/apidocs.socketio.socketioserver.stop.html) | Stop the socketio server | |
| [use(fn)](/doc/en/lb4/apidocs.socketio.socketioserver.use.html) | Register a sock.io middleware function |