public Socket Open()
 {
     Task.Run(() =>
     {
         if (!Connected)
         {
             _io.Open();
             if (_io.ReadyState == Manager.ReadyStateEnum.OPEN)
             {
                 OnOpen();
             }
         }
     });
     return(this);
 }
Ejemplo n.º 2
0
        public Socket Open()
        {
            var t = new Task(() =>
            {
                if (!Connected)
                {
                    _io.Open();
                    if (_io.ReadyState == Manager.ReadyStateEnum.OPEN)
                    {
                        OnOpen();
                    }
                }
            });

            t.Start();
            return(this);
        }