unity  back to  


Get Unified

Unity Technote 00006: Manually retrieving a socket policy file

This technote describes how to configure a Flash client application to manually retrieve a socket policy file from Unity Multiuser Server.

  1. Be sure your Unity Multiuser Server is configured to serve a socket policy file.
  2. In your Unity client application directory, edit the client configuration file. The client configuration file is the file specified as the fourth argument to your application's UClient subclass constructor. For example, in the example uSimpleChat sample application included with UClient for Flash, the client configuration file is uSimpleChatConfig.xml.
  3. In the <policyPort> tag, specify the port on which Unity's Policy File Server is running (default port is 9102; master port is 843). For example, here is the uSimpleChatConfig.xml configuration file:
    <?xml version="1.0"?>
    <config>
      <server>moock.org</server>
      <port>9100
      <logLevel>DEBUG</logLevel>
      <policyPort>9102</policyPort>
    </config>
Alternatively, if you do not use a client configuration file, you should pass the policy file port for your server as the third argument to UClient.setServer() before connecting to Unity Multiuser Server.

Revision history

April 5, 2008: Posted