# SocketIOService Service

Module
import { SocketIOService } from "@tsed/socketio"
Source/packages/socketio/src/services/SocketIOService.ts

# Overview

class SocketIOService {
/**
 *
 * @type <span class="token punctuation">{</span>Map&lt;<span class="token keyword">any</span><span class="token punctuation">,</span> <span class="token keyword">any</span>&gt;<span class="token punctuation">}</span>
 */

<span class="token keyword">constructor</span><span class="token punctuation">(</span>injector<span class="token punctuation">:</span> <a href="/api/di/services/InjectorService.html"><span class="token">InjectorService</span></a><span class="token punctuation">,</span> io<span class="token punctuation">:</span> SocketIO.Server<span class="token punctuation">,</span> converterService<span class="token punctuation">:</span> <a href="/api/common/converters/services/ConverterService.html"><span class="token">ConverterService</span></a><span class="token punctuation">)</span><span class="token punctuation">;</span>
/**
 *
 * @param <span class="token punctuation">{</span><span class="token keyword">string</span><span class="token punctuation">}</span> namespace
 * @returns <span class="token punctuation">{</span>SocketIO.<a href="/api/socketio/decorators/Namespace.html"><span class="token">Namespace</span></a><span class="token punctuation">}</span>
 */
<span class="token function">getNsp</span><span class="token punctuation">(</span>namespace?<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token punctuation">{</span>
    nsp<span class="token punctuation">:</span> SocketIO.<a href="/api/socketio/decorators/Namespace.html"><span class="token">Namespace</span></a><span class="token punctuation">;</span>
    instances<span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
/**
 *
 * @param <span class="token punctuation">{</span><a href="/api/di/class/Provider.html"><span class="token">Provider</span></a>&lt;<span class="token keyword">any</span>&gt;<span class="token punctuation">}</span> provider
 */
<span class="token function">addSocketProvider</span><span class="token punctuation">(</span>provider<span class="token punctuation">:</span> <a href="/api/di/class/Provider.html"><span class="token">Provider</span></a>&lt;<span class="token keyword">any</span>&gt;<span class="token punctuation">)</span><span class="token punctuation">:</span> <span class="token keyword">void</span><span class="token punctuation">;</span>

}