IEnumerator Communicate() { while (true) { dataList[0] = transform.position.x; dataList[1] = transform.position.y; dataList[2] = transform.position.z; socket.SendData(dataList); yield return(new WaitUntil(() => ReceiveData())); } }