- Home /
Where can I find the Policy Server?
I've been looking for an example of, or the actual distribution of the Socket-Policy server for the web-player to fetch the Socket-Policy over port 843. I've been reading the documentation over at http://docs.unity3d.com/Manual/SecuritySandbox.html
But I guess I just keep missing it, anybody care to point me in the right direction so I can set up my API for webplayer usage?
The documentation told you where it was on your system:
For your convenience, we provide a small program which simply listens at port 843; when on a connection it receives a request string, it will reply with a valid socket policy. The server code can be found inside the Unity install folder, in Data/Tools/SocketPolicyServer on Windows or /Unity.app/Contents/Tools/SocketPolicyServer on OS X. Note that the pre-built executable can be run on $$anonymous$$ac since it is a $$anonymous$$ono executable. Just type “mono sockpol.exe” to run it. Note that this example code shows the correct behaviour of a socket policy server. Specifically the server expects to receive a zero-ter$$anonymous$$ated string that contains . It only sends to the client the socket policy xml document when this string (and exactly this string) has been received. Further, it is required that the xml header and xml body are sent with a single socket write. Breaking the header and body into separate socket write operations can cause security exceptions due to Unity receiving an incomplete policy. If you experience any problems with your own server please consider using the example that we provide. This should help you diagnose whether you have server or network issues.