---
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

<b>Signature:</b>

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

## Constructors

|  Constructor | Modifiers | Description |
|  --- | --- | --- |
|  [(constructor)(app, options)](./socketio.socketioserver._constructor_.md) |  | Constructs a new instance of the <code>SocketIoServer</code> class |

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [app](./socketio.socketioserver.app.md) |  | [Application](./core.application.md) |  |
|  [config](./socketio.socketioserver.config.md) |  | [HttpServerResolvedOptions](./socketio.httpserverresolvedoptions.md) |  |
|  [listening](./socketio.socketioserver.listening.md) |  | boolean |  |
|  [options](./socketio.socketioserver.options.md) |  | [SocketIoServerOptions](./socketio.socketioserveroptions.md) |  |
|  [url](./socketio.socketioserver.url.md) |  | string |  |

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [controller(controllerClass)](./socketio.socketioserver.controller.md) |  | Register a socket.io controller |
|  [discoverAndRegister()](./socketio.socketioserver.discoverandregister.md) |  | Discover all socket.io controllers and register routes |
|  [route(controllerClass, meta)](./socketio.socketioserver.route.md) |  | Register a socketio controller |
|  [start()](./socketio.socketioserver.start.md) |  | Start the socketio server |
|  [stop()](./socketio.socketioserver.stop.md) |  | Stop the socketio server |
|  [use(fn)](./socketio.socketioserver.use.md) |  | Register a sock.io middleware function |


