 
   extend @, ServiceAPI, RecoveryAPI
 
-  # Crates an object and starts a new server instance.
+  # Crates an object and starts a new service instance.
   #
   # @param options [Object] Service configuration options.
   #


  # Client connection hook.
  #
  # @param instance [ChatService] Service instance.
  # @param id [String] Socket id.
  # @param cb [Callback] Optional callback.
  #

  #   data are send back with a {ServerMessages#loginConfirmed}
  #   message. Error is sent as a {ServerMessages#loginRejected}
  #   message.
  onConnect : (server, id, cb) ->

  # Executes when server is started (after a state and a transport are
  # up, but before message processing is started).
  #
  # @param server [ChatService] Service instance.
  # @param cb [Callback] Optional callback.
  #
  # @return [Promise]
  onStart : (server, cb) ->

  # Executes when server is closed (after a transport is closed and
  # all clients are disconnected, but a state is still up).
  #
  # @param server [ChatService] Service instance.
  # @param cb [Callback] Optional callback.
  #
  # @return [Promise]
  onClose : (server, cb) ->

  # Validator for {UserCommands#directMessage} message objects. When
  # is set, a custom format in direct messages is enabled. When hooks
