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!
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!