code: function(url, dep_protocols_whitelist, options) {
      var that = this, protocols_whitelist;
      that._options = {devel: false, debug: false, protocols_whitelist: [],
                       info: undefined, rtt: undefined};
      if (options) {
          utils.objectExtend(that._options, options);
      }
      that._base_url = utils.amendUrl(url);
      that._server = that._options.server || utils.random_number_string(1000);
      if (that._options.protocols_whitelist &&
          that._options.protocols_whitelist.length) {
          protocols_whitelist = that._options.protocols_whitelist;
      } else {
          // Deprecated API
          if (typeof dep_protocols_whitelist === 'string' &&
              dep_protocols_whitelist.length > 0) {
              protocols_whitelist = [dep_protocols_whitelist];
          } else if (utils.isArray(dep_protocols_whitelist)) {
              protocols_whitelist = dep_protocols_whitelist
          } else {
              protocols_whitelist = null;
          }
          if (protocols_whitelist) {
              that._debug('Deprecated API: Use "protocols_whitelist" option ' +
                          'instead of supplying protocol list as a second ' +
                          'parameter to SockJS constructor.');
          }
      }
      that._protocols = [];
      that.protocol = null;
      that.readyState = SockJS.CONNECTING;
      that._ir = createInfoReceiver(that._base_url);
      that._ir.onfinish = function(info, rtt) {
          that._ir = null;
          if (info) {
              if (that._options.info) {
                  // Override if user supplies the option
                  info = utils.objectExtend(info, that._options.info);
              }
              if (that._options.rtt) {
                  rtt = that._options.rtt;
              }
              that._applyInfo(info, rtt, protocols_whitelist);
              that._didClose();
          } else {
              that._didClose(1002, 'Can\'t connect to server', true);
          }
      };
  }
docs: [*] Including lib/sockjs.js /*
  ***** BEGIN LICENSE BLOCK *****
  Copyright (c) 2011-2012 VMware, Inc.
  
  For the license see COPYING.
  ***** END LICENSE BLOCK *****