IEnumerator CheckQueue() { WaitForSeconds waitSec = new WaitForSeconds(0.1f); while (true) { if (_socket != null && _socket.Connected) { SocketEventHandler(_socket.HasEvent()); } yield return(waitSec); } }