code: function openServer(that, cb) {  // {{{2
    if (O.ssl) {
      that.http = require('https').createServer({
        key: O.ssl.key,
        cert: O.ssl.cert,
      });
    } else {
      that.http = require('http').createServer();
    }
  
    that.http.on('error', onError);
    that.http.on('request', onRequest.bind(that));
    that.http.listen(that.port, that.ip, function(err) {
      if (err) {
        cb(err);
        return;
      }
  
      O.log.notice((O.ssl ? 'HTTPs' : 'HTTP') + ' server started', {ip: that.ip || 'all', port: that.port});
  
      that.ws = new (require('ws').Server)({
        server: that.http,
        verifyClient: onVerify.bind(that),
      });
      that.ws.on('connection', onConnect.bind(that));
      that.ws.on('error', onError);
  
      O.log.notice('WebSockets server started');
  
      cb();
      return;
    });
  }
docs: Private {{{1