addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgoogleimageimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

Miltown Game Developers Message Board › Has anyone worked with WWW, HttpWebRequest or TcpClient in the Web Player?

Has anyone worked with WWW, HttpWebRequest or TcpClient in the Web Player?

Dan S.
hpdvs2
Warrenville, IL
Post #: 14
Hello, I've used WWW, HttpWebRequest and other attempts at networking to reach my server. They all work when run as a windows client, or in the IDE (running in windows) but when I compile to Web Player, the network always errors out, and WWW essentially freezes.

Anyone with thoughts on what to check for?
Chris
user 29285542
Milwaukee, WI
Post #: 3
Haven't done that kinda stuff myself, but I know (vaguely) that you need a cross domain xml file on your server for security reasons. Could be the problem.
more info here > [Sandbox]
Dan S.
hpdvs2
Warrenville, IL
Post #: 15
Very True. The Crossdomain is necessary, but that is from the windows client/IDE as well. It works in the IDE/Windows builds, just not the Web Player. The really annoying part for me at the moment, is unity says that HttpWebRequest/Response are supported by web player, but in practice it throws a NotSupported exception.

Unless there is a difference needed in the CrossDomain.xml file, between Windows and Web, I haven't found a working solution yet.
Chris
user 29285542
Milwaukee, WI
Post #: 4
hmm ... that error probably means it just won't work ... this is a random thing I found on the internet ... Give it a shot
Dan S.
hpdvs2
Warrenville, IL
Post #: 16
Thanks for your help. I didn't try the library you suggested but I did get it running. It didn't care for the crossdomain.xml file like the windows/IDE versions were able to use. Instead I had to install a special Socket Policy Security Service. I posted it in my blog http://warpwars.blogspot.com/­. It also has a link to try what little there is to do in the game. (only a couple weeks into development)
Chris
user 29285542
Milwaukee, WI
Post #: 5
Glad you got it working! My next idea was maybe trying to use External eval calls ... but again, just throwing darts. I gave the web demo a try. My router was giving me a warning about the website, there weren't any details, just that it might be malicious. I opened it anyway and got the Unable to connect to server null reference, probably because you are working on it or something. Anywho good luck with things.
Dan S.
hpdvs2
Warrenville, IL
Post #: 17
The issue was probably because WarpWars.rr.nu is a dynamic domain name service(www.rr.nu). I've used it for more than a decade without issue on their side. I'm planning on switching to a locked DNS system soon. Thanks for your help.
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy