code: function connect()
      {
          if(scope._conn)
          {
              if(scope._conn.readyState === 1)
              {
                  return;
              }
              scope._conn.close();
          }
          var url = (scope._redirectURL.length>0) ? scope._redirectURL : scope._url;
  
          scope._conn            = new WebSocket(url);
          scope._conn.binaryType = "arraybuffer";
          scope._conn.open       = onOpen;
          scope._conn.onerror    = onerror;
          scope._conn.onclose    = onClose;
          scope._conn.onmessage  = onMessage;
      }
docs: connects to server