Jacob12138xieyuan / real-time-3d-pose-estimation-with-Unity3D

87 stars 26 forks source link

The problem of socket communication in Unity #5

Open Ancolie18 opened 2 years ago

Ancolie18 commented 2 years ago

Hello, thank you for sharing. I have encountered some problems and would like to ask you for advice.

When I run the Unity part and change the IP address to my local IP address, the entire project will crash due to socket communication, and there will be no response. According to the test, the problem is tcpserver. Accept() in Update, or the main thread is blocked here;

When I later try to use the Socket asynchronous long connection to create a thread to receive data from the client, it can run normally.

Is it feasible for you to repeatedly connect clients and receive data in Update?Look forward to your reply, thank you!