In summary, I am running the testing webhost on a non-static ip, and using a dyndns service to update the ip on change. My main issue arises with the crossdomain policy's retreival as that requires a ip rather than a hostname.
Currently using sfs2x 2.7 with unity3d 4.1.5f running under windows 7.
Apache and obviously sfs2x are installed and working, although there is no module for apache that will run on the windows version to allow socket policy so that is being handled by sfs.
What I am needing to find out is how I can resolve the hostname into a useable ip address for the PrefetchSocketPolicy(serverName, serverPort, timeout)?
I have tried using a hostname directly which just hangs indefinately after warning that policy file failed to load and no other warnings.
I have also tried using serverip=Dns.GetHostAddresses(hostname)[0].ToString(); but that just gives an infinate error after it stops smartFox from instantiating.
the code samples of the effected areas are below:
Code: Select all
if (Application.isWebPlayer || Application.isEditor) {
//serverip=Dns.GetHostAddresses("http://devtest.servegame.com")[0].ToString();
Debug.Log(serverip);
if (!Security.PrefetchSocketPolicy(host, serverPort, 500)) {
Debug.LogError("Security Exception. Policy file load failed!");
}
}
if (SmartFoxConnection.IsInitialized) {
smartFox = SmartFoxConnection.Connection;
} else {
//Security.PrefetchSocketPolicy(serverName, serverPort);
smartFox = new SmartFox(debug);
}
not sure what other parts may assist for some help, but more than happy to post other sections if you let me know what would help. Otherwise, hopefully someone has an idea on how to work this?
I had searched up on it, and found a similar issue back last year, but the post didnt say how it got resolved, if it ever did.
Thanks in advance.