text: module.exports = function(app) {
    return new Handler(app);
  };
  
  var Handler = function(app) {
    this.app = app;
  };
  
  /**
   * New client entry.
   * 新客户端入口 (调用见 web-server/public/index.html)
   *
   * @param  {Object}   msg     request message
   * @param  {Object}   session current session object
   * @param  {Function} next    next step callback
   * @return {Void}
   */
  Handler.prototype.entry = function(msg, session, next) {
    next(null, {code: 200, msg: 'game server is ok.'});
  };
  
  /**
   * Publish route for mqtt connector.
   * 发布路由 (用于 mqtt connector, 配置见 app.js.mqtt)
   *
   * @param  {Object}   msg     request message
   * @param  {Object}   session current session object
   * @param  {Function} next    next step callback
   * @return {Void}
   */
  Handler.prototype.publish = function(msg, session, next) {
  	var result = {
  		topic: 'publish',
  		payload: JSON.stringify({code: 200, msg: 'publish message is ok.'})
  	};
    next(null, result);
  };
  
  /**
   * Subscribe route for mqtt connector.
   * 订阅路由 (用于 mqtt connector, 配置见 app.js.mqtt)
   *
   * @param  {Object}   msg     request message
   * @param  {Object}   session current session object
   * @param  {Function} next    next step callback
   * @return {Void}
   */
  Handler.prototype.subscribe = function(msg, session, next) {
  	var result = {
  		topic: 'subscribe',
  		payload: JSON.stringify({code: 200, msg: 'subscribe message is ok.'})
  	};
    next(null, result);
  };
  