# SocketHandlersBuilder Class

Module
import { SocketHandlersBuilder } from "@tsed/socketio/src/class/SocketHandlersBuilder"
Source/packages/socketio/src/class/SocketHandlersBuilder.ts

# Overview

class SocketHandlersBuilder {
<span class="token keyword">constructor</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> 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> injector<span class="token punctuation">:</span> <a href="/api/di/services/InjectorService.html"><span class="token">InjectorService</span></a><span class="token punctuation">)</span><span class="token punctuation">;</span>
/**
 *
 * @returns <span class="token punctuation">{</span><span class="token keyword">any</span><span class="token punctuation">}</span>
 */
<span class="token function">build</span><span class="token punctuation">(</span>nsps<span class="token punctuation">:</span> Map&lt;<span class="token keyword">string</span><span class="token punctuation">,</span> SocketIO.<a href="/api/socketio/decorators/Namespace.html"><span class="token">Namespace</span></a>&gt;<span class="token punctuation">)</span><span class="token punctuation">:</span> this<span class="token punctuation">;</span>
/**
 *
 * @param <span class="token punctuation">{</span><span class="token keyword">string</span><span class="token punctuation">}</span> hook
 * @param <span class="token punctuation">{</span><span class="token keyword">string</span><span class="token punctuation">}</span> eventName
 */

/**
 *
 * @param <span class="token punctuation">{</span>SocketIO.<a href="/api/socketio/decorators/Socket.html"><span class="token">Socket</span></a><span class="token punctuation">}</span> socket
 * @param <span class="token punctuation">{</span>SocketIO.<a href="/api/socketio/decorators/Namespace.html"><span class="token">Namespace</span></a><span class="token punctuation">}</span> nsp
 */
<span class="token function">onConnection</span><span class="token punctuation">(</span>socket<span class="token punctuation">:</span> SocketIO.<a href="/api/socketio/decorators/Socket.html"><span class="token">Socket</span></a><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><span class="token punctuation">:</span> <span class="token keyword">void</span><span class="token punctuation">;</span>
<span class="token function">onDisconnect</span><span class="token punctuation">(</span>socket<span class="token punctuation">:</span> SocketIO.<a href="/api/socketio/decorators/Socket.html"><span class="token">Socket</span></a><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><span class="token punctuation">:</span> <span class="token keyword">void</span><span class="token punctuation">;</span>
/**
 *
 * @param <span class="token punctuation">{</span>SocketIO.<a href="/api/socketio/decorators/Socket.html"><span class="token">Socket</span></a><span class="token punctuation">}</span> socket
 */

/**
 *
 * @param <span class="token punctuation">{</span>SocketIO.<a href="/api/socketio/decorators/Socket.html"><span class="token">Socket</span></a><span class="token punctuation">}</span> socket
 */

/**
 *
 * @param <span class="token punctuation">{</span>SocketIO.<a href="/api/socketio/decorators/Socket.html"><span class="token">Socket</span></a><span class="token punctuation">}</span> socket
 * @param <span class="token punctuation">{</span>SocketIO.<a href="/api/socketio/decorators/Namespace.html"><span class="token">Namespace</span></a><span class="token punctuation">}</span> nsp
 */

/**
 *
 * @param <span class="token punctuation">{</span><a href="/api/socketio/interfaces/ISocketHandlerMetadata.html"><span class="token">ISocketHandlerMetadata</span></a><span class="token punctuation">}</span> handlerMetadata
 * @param args
 * @param <span class="token punctuation">{</span>SocketIO.<a href="/api/socketio/decorators/Socket.html"><span class="token">Socket</span></a><span class="token punctuation">}</span> socket
 * @param <span class="token punctuation">{</span>SocketIO.<a href="/api/socketio/decorators/Namespace.html"><span class="token">Namespace</span></a><span class="token punctuation">}</span> nsp
 * @returns <span class="token punctuation">{</span><span class="token punctuation">(</span>parameters<span class="token punctuation">)</span> =&gt; Promise&lt;<span class="token keyword">void</span>&gt;<span class="token punctuation">}</span>
 */

/**
 *
 * @param <span class="token punctuation">{</span><a href="/api/socketio/interfaces/ISocketHandlerMetadata.html"><span class="token">ISocketHandlerMetadata</span></a><span class="token punctuation">}</span> handlerMetadata
 * @param scope
 */

/**
 *
 * @param <span class="token punctuation">{</span><a href="/api/socketio/interfaces/ISocketHandlerMetadata.html"><span class="token">ISocketHandlerMetadata</span></a><span class="token punctuation">}</span> handlerMetadata
 * @param scope
 * @returns <span class="token punctuation">{</span><span class="token punctuation">(</span>data<span class="token punctuation">)</span> =&gt; <span class="token keyword">void</span><span class="token punctuation">}</span>
 */

/**
 *
 * @param target
 * @param scope
 * @param promise
 * @returns <span class="token punctuation">{</span><span class="token punctuation">(</span>args<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> =&gt; Promise&lt;<span class="token keyword">any</span><span class="token punctuation">[</span><span class="token punctuation">]</span>&gt;<span class="token punctuation">}</span>
 */

/**
 *
 * @returns <span class="token punctuation">{</span>Promise&lt;<span class="token keyword">any</span>&gt;<span class="token punctuation">}</span>
 * @param instance
 * @param handlerMetadata
 * @param scope
 */

/**
 *
 * @param parameters
 * @param scope
 * @returns <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>
 */

}