---
lang: en
title: 'API docs: socketio.socketioserver'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/extensions/socketio
permalink: /doc/en/lb4/apidocs.socketio.socketioserver.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/socketio](./socketio.md) &gt; [SocketIoServer](./socketio.socketioserver.md)

## SocketIoServer class

A socketio server

**Signature:**

```typescript
export declare class SocketIoServer extends Context 
```
**Extends:** [Context](./context.context.md)

## Constructors

<table><thead><tr><th>

Constructor


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[(constructor)(app, options)](./socketio.socketioserver._constructor_.md)


</td><td>


</td><td>

Constructs a new instance of the `SocketIoServer` class


</td></tr>
</tbody></table>

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[app](./socketio.socketioserver.app.md)


</td><td>


</td><td>

[Application](./core.application.md)


</td><td>


</td></tr>
<tr><td>

[config](./socketio.socketioserver.config.md)


</td><td>

`readonly`


</td><td>

[HttpServerResolvedOptions](./socketio.httpserverresolvedoptions.md)


</td><td>


</td></tr>
<tr><td>

[listening](./socketio.socketioserver.listening.md)


</td><td>

`readonly`


</td><td>

boolean


</td><td>


</td></tr>
<tr><td>

[options](./socketio.socketioserver.options.md)


</td><td>

`protected`


</td><td>

[SocketIoServerOptions](./socketio.socketioserveroptions.md)


</td><td>


</td></tr>
<tr><td>

[url](./socketio.socketioserver.url.md)


</td><td>

`readonly`


</td><td>

string


</td><td>


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[controller(controllerClass)](./socketio.socketioserver.controller.md)


</td><td>


</td><td>

Register a socket.io controller


</td></tr>
<tr><td>

[discoverAndRegister()](./socketio.socketioserver.discoverandregister.md)


</td><td>


</td><td>

Discover all socket.io controllers and register routes


</td></tr>
<tr><td>

[route(controllerClass, meta)](./socketio.socketioserver.route.md)


</td><td>


</td><td>

Register a socketio controller


</td></tr>
<tr><td>

[start()](./socketio.socketioserver.start.md)


</td><td>


</td><td>

Start the socketio server


</td></tr>
<tr><td>

[stop()](./socketio.socketioserver.stop.md)


</td><td>


</td><td>

Stop the socketio server


</td></tr>
<tr><td>

[use(fn)](./socketio.socketioserver.use.md)


</td><td>


</td><td>

Register a sock.io middleware function


</td></tr>
</tbody></table>

