- Home /
TCPClient on webplayer crashes.
Hi. I recently tried to make client/server connection between Unity Webplayer and TCPListener server written in C#. The problem is when I start it, whole browser crashes (or when tested in Editor whole editor crashed) without any possibility to stop executing. The funny thing is logs say everything is OK.
Platform assembly: C:\Users\Chlopaki\AppData\LocalLow\Unity\WebPlayer\player\Alpha3.x.x\Data\lib\CrossDomainPolicyParser.dll (this message is harmless)
SocketPolicyClient1: Incoming GetPolicyStreamForIP
SocketPolicyClient1: About to BeginConnect to 127.0.0.1:843
SocketPolicyClient1: About to WaitOne
SocketPolicyClient1: Socket connected
However when i change my TCPListener port to default for crossdomain-policy (843) client sends request to server for a policy. It receives nothing and it doesn't crash.
My crossdomain.xml looks like that:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*" to-ports="500-1000"/>
</cross-domain-policy>
Any idea what am i doing wrong?
PS. WWW Class requests works perfectly.
Answer by Iraasta · Nov 14, 2013 at 01:08 AM
Ok. I solved the problem. For all looking for an answer. Socket policy file must be hosted on it's own server on port 843. For simple crossdomain.xml hosting server search in unity folder for sockpol.exe
Your answer
Follow this Question
Related Questions
Can I export a swf from Unity which is "local-with-filesystem"? 0 Answers
Webplayer sandbox security policy: When do I prefetch security policy? 1 Answer
How do I identify the offending method for "attempt to access a private/protected method failed"? 2 Answers
Qesition about policy server for webplayer. 0 Answers
Does NetworkServer and Network.InitializeSecurity() 0 Answers