- Home /
How connect from Unity WebPlayer app to C# server
I develop some app with Unity for web. And I have C# prog (server). When Unity app start, it send data to server for calculating.
I can't understand what I must doing when my app send to server "< policy-file-request />" string. I try send with socket content of file "crossdomain.xml" but it not work.
Answer by Graham-Dunnett · Jan 29, 2013 at 03:49 PM
The socket policy file is only needed if your application wants to open a socket to a remote server. In this case, the web player requests the socket policy file on port 843 to check that the remote server is happy to accept socket connections.
Think of it like this. You want to date some girl. You ask her if you can have her phone number. If she gives you her number, then you can call her and set up a date. If she does not give you her number, or runs away screaming, then you cannot date her.
You want to talk to a remote server. You ask for a socket policy file. If the server gives you a file, and it says you can connect, then you can connect over a socket and talk to the server. If the server does give you permission, or does not return a policy file, then you cannot connect to the server.
This process is only required if you build a webplayer, and is needed only if you are opening sockets to remote machines, where remote means not the server that issued the unity3d file.
I deploy client(Unity) and server (C# desktop app) on my PC but client try get policy file automatically. What I must doing? How my server app should send response?
Your answer
Follow this Question
Related Questions
Security.PrefetchSocketPolicy problem. 0 Answers
How to optimize the build game for unity webplayer? 1 Answer
Web Player "Invalid Data File" 1 Answer