@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
40 lines (30 loc) • 1.24 kB
Markdown
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) > [@loopback/socketio](./socketio.md) > [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) {
}
```
|