lib/controllers/SocketController.js
function SocketController(namespace) {
  SocketController.super_.call(this);

  Object.defineProperties(this, {

    /**
     * Socket's namespace associated to the controller.
     *
     * @property namespace
     * @type SocketNamespace
     * @final
     */
    namespace: {value: namespace},

    /**
     * An emitter to emits clients' messages.
     *
     * @property emitter
     * @type AdvancedEmitter
     * @final
     */
    emitter: {value: new AdvancedEmitter()}

  });
}
function SocketController(namespace) {
  SocketController.super_.call(this);

  Object.defineProperties(this, {

    /**
     * Socket's namespace associated to the controller.
     *
     * @property namespace
     * @type SocketNamespace
     * @final
     */
    namespace: {value: namespace},

    /**
     * An emitter to emits clients' messages.
     *
     * @property emitter
     * @type AdvancedEmitter
     * @final
     */
    emitter: {value: new AdvancedEmitter()}

  });
}
function SocketController ( namespace ) { SocketController . super_ . call ( this ) ; Object . defineProperties ( this , { /**
     * Socket's namespace associated to the controller.
     *
     * @property namespace
     * @type SocketNamespace
     * @final
     */ namespace : { value : namespace } , /**
     * An emitter to emits clients' messages.
     *
     * @property emitter
     * @type AdvancedEmitter
     * @final
     */ emitter : { value : new AdvancedEmitter ( ) } } ) ; }
Defines base controller for all controllers which need to handle socket messages.

A SocketController is associated to a namespace to be able to emit a message to the
whole socket namespace.

A SocketController is also associated to an emitter to emit socket's clients' messages to pilots.

// Implement a SocketController : "CustomSocketController"
var util = require('util');
var openVeoApi = require('@openveo/api');

function CustomSocketController(namespace) {
CustomSocketController.super_.call(this, namespace);
}

util.inherits(CustomSocketController, openVeoApi.controllers.SocketController);

@class SocketController
@extends Controller
@constructor
@param {SocketNamespace} namespace The socket namespace associated to the controller
Defines base controller for all controllers which need to handle socket messages .