private void NetworkLoop() { while (status == NetworkStatus.Active) { //Debug.Log(status); udpClient.Receive(); SendSocketData(); int sent = udpClient.SendTo(multicastEndPoint); //Debug.Log(sent + " bytes sent"); Thread.Sleep(NETWORK_SLEEP); } udpClient.Close(); }
public int ReceiveData() { return(udpClient.Receive()); }