             @socketOnSend socket, ["peer.authentification", socket.cinfo]
             console.log "New client has been accepted as #{cid} in room #{param.rid}"
 
+        # Check if the clientID sent by the new peer is valid.
         clientValidation  : (param) =>
             Request.get "#{Config.Restapi.Url}/user/#{param.cid}", (e, r, data) =>
                 if e? or r.statusCode > 200


            @socketOnSend socket, ["peers", clientsInfos]

        acceptPeer        : (param) =>
            cid               = generateRandomId()
            socket            = param.socket

                else
                    @clientValidation param

        # Check if the token sent by the new peer is valid.
        # If yes, we get the roomID and clientID in the database to authentificate the new peer.
        tokenValidation   : (param) =>
            Request.get "#{Config.Restapi.Url}/token/#{param.token}", (e, r, data) =>
                if e? or r.statusCode > 200
