---
lang: en
title: 'API docs: socketio.socketioserver.controller'
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.controller.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) &gt; [controller](./socketio.socketioserver.controller.md)

## SocketIoServer.controller() method

Register a socket.io controller

<b>Signature:</b>

```typescript
controller(controllerClass: Constructor<unknown>): Binding<unknown>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  controllerClass | [Constructor](./context.constructor.md)<!-- -->&lt;unknown&gt; |  |

<b>Returns:</b>

[Binding](./context.binding.md)<!-- -->&lt;unknown&gt;


