I have no problem with UNet in localhost, I decide to test it on a public server.
I use Amazon EC2 x.large tier as a server for test, the issue occur this way:
Client(my pc) has no problem at connection, but after connected 10s-30s later, it shows unet disconnect error. (No matter whether 1 client or multiple clients). For multiple clients, they disconnect at the same time.
The server has a stable connection with earlier version network demo(unity 4.6), so I guess the problem is still on some minor protocol verify error, the one frame msg verify error cause the client disconnect, while not discard this one frame msg mismatch and continue.
Any one has suggestion on this?
Thanks.
what was the error with disconnect event? Can you simulate this with network simulation? like clumsy? and what is you unity version?
The error msg is: Unet Client Disconnect Error : Timeout.
Unity Verion: 5.1.2f1
I have try ulink demo yesterday, four client demo link to the public server at the same time, the scene is with rigidbody cube random fast movement, scene running smooth.
But there happen to be some freeze time(1s) each 10s to 30s, then the scene continue with no error. So, maybe the problem is at amazon side, since it’s a timeshare virtual machine, there is some cpu freeze time which will affect intense socket connection?
I will digger more on this and then report the results.
I found the reason, since I use a vpn software at my pc to boost the link speed. The disconnect is may caused by some protocol issue with the vpn software itsself.
When I close the vpn software, it’s ok. At least 5 min connection with no disconnection or freeze both for UNet and ULink.
If there could be some methods to handle the disconnect issue will be cool, currently, it just leave the scene instantly. In real game situation, it will be better to stay in the scene, prompt some information to user, and try reconnect instantly. Thanks.