---
lang: en
title: 'API docs: socketio.socketio'
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.socketio.html
---

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

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

## socketio namespace

<b>Signature:</b>

```typescript
export declare namespace socketio 
```

## Functions

|  Function | Description |
|  --- | --- |
|  [connect()](./socketio.socketio.connect.md) | Decorate a controller method for <code>connect</code> |
|  [disconnect()](./socketio.socketio.disconnect.md) | Decorate a controller method for <code>disconnect</code> |
|  [io()](./socketio.socketio.io.md) |  |
|  [namespace(name)](./socketio.socketio.namespace.md) |  |
|  [socket()](./socketio.socketio.socket.md) |  |
|  [subscribe(messageTypes)](./socketio.socketio.subscribe.md) | Decorate a method to subscribe to socketio events. For example,
```ts
@socketio.subscribe('chat message')
async function onChat(msg: string) {
}
```
 |


