 validator = require "../validator"
 codes = require "../codes"
 
+#
+# Class that defines a socket-IO Connector (to connect a hAPI to a hEngine)
+#
 class SocketIO_Connector
-  ###
-  Runs a SocketIO Connector with the given arguments.
-  @param args - {
-  logLevel : DEBUG, INFO, WARN or ERROR
-  port : int
-  commandOptions : {} Command Controller Options
-  }
-  ###
+
+  # @property {boolean} Connector's status
+  started: undefined
+
+  #
+  # Connector's constructor. Create the websocket which be used by the socketIO adapter.
+  # @param properties {object} Properties of the socket-IO connector
+  #
   constructor: (properties) ->
     if properties.owner
     then @owner = properties.owner


    io.set "log level", logLevels[@owner.log_properties.logLevel]

    channel = io.on("connection", (socket) =>
      id = socket.id
      clients[id] =
        id: id


    )

  #
  # Method which connect the websocket
  # @param client {object} Reference to the client
  # @param data {object} Connexion data (urn, password)
  #
  connect: (client, data) ->
    unless client
      @owner.log "warn", "A client sent an invalid ID with data", data
