Skip to content

SocketService

@tsed/socketio

Usage

typescript
import { SocketService } from "@tsed/socketio";

See /packages/third-parties/socketio/src/types/decorators/socketService.ts.

Overview

ts
function SocketService(namespace?: string | RegExp): any;

Description

The decorators @SocketService() a new socket service (and service) can be injected in other service or controller on there constructor. All services annotated with @SocketService() are constructed one time.

@SocketService() use the reflect-metadata to collect and inject service on controllers or other services.

Released under the MIT License.