- Home /
Custom server for online browser game.
I have made a custom server for an online browser game in python and the client side using TcpClient in Unity.
Though I got it all to work there are some issues that confuse me and may save others some time if my findings are correct.
1) Policy request
When Unity requests the file policy from the server (Security.PrefetchSocketPolicy sending '') it uses the terminator '\0' but in all subsequent data exchange it uses terminator '\r\n'. Is this true? And if so why use two terminators?
2) host name vs host ip
When connecting to the server in the editor it is possible to connect using host name e.g. someserver.com. However! When biuilding for the webplayer you must resolve and use the server ip. (I used Dns.GetHostEntry etc.). If I'm not completely mistaken, why is there a difference in functionality here?