code: function onClose(e)
      {
          if(scope.onClose)
          {
              scope.onClose(e);
          }
          scope._redirectURL    = "";
          scope._conn.onopen    = null;
          scope._conn.onerror   = null;
          scope._conn.onclose   = null;
          scope._conn.onmessage = null;
          reconnectServer();
      }
docs: close callback