code: function createChannelServer(options, cb) {
  
    host = options.host = options.host || Utils.getIP();
    port = options.port || 8080;
    options['type'] = 'CHANNEL';
  
    chkInitProcess(options);
  
    var restify = require('restify');
    var socketio = require('socket.io');
  
    var serverOption = options.server || {};
  
    if (!serverOption.name) serverOption.name = 'xpush';
  
    if (options.httpsServerOptions) {
      serverOption.httpsServerOptions = options.httpsServerOptions;
      options.protocol = 'https';
    } else {
      options.protocol = 'http';
    }
  
    var server = restify.createServer(serverOption);
  
    var io = socketio.listen(server.server);
  
    server.use(restify.CORS());
    server.on('error', onError);
  
    var channelServer = require('./xpush-channel-server.js');
    channelServer.init(server, io, options, function(err, result) {
  
      if (err) {
        console.error(err, result);
        if (cb) cb(err, result);
      } else {
        server.listen(port, function() {
  
          console.log(welcome(options), '"CHANNEL server" listening at ' + host + ":" + port);
  
          channelServer.emit("started", host, port);
          channelServer._addNamespace();
  
          if (cb) cb(err, {
            "host": host,
            "port": port
          });
  
        });
      }
  
    });
    return (channelServer);
  }
docs: CHANNEL SERVER