Security.PrefetchSocketPolicy return false?

what reason cause the function Security.PrefetchSocketPolicy return false?

It should return true according to the document.

Any advice are welcome, and thanks a lot~ :slight_smile:

That it can’t prefetch the policy from the target server likely.

Thx dreamora,

I use the tool(sockpol.exe with command --all) can receieve the request of Unity successfully.

“incoming connection
got policy request, sending response”

But the Unity Security.PrefetchSocketPolicy still return false?

.<

any code? perhaps its just an error in the code :slight_smile:

Below is client code:

void Start()
{
bool isSuccessful = Security.PrefetchSocketPolicy(“127.0.0.1”, 843);
Debug.Log(isSuccessful);
}

Server by using sockpol.exe -all

That is simple test…

unsure if 127.0.0.1 is meant to work actually as thats definitely no server as its defined as loopback. keep in mind, Unity webplayer will NOT allow you to talk to other non-servers.

Thx dreamora a lot,

Security.PrefetchSocketPolicy returns TRUE when connecting sockpol.exe first time.

It is work fined now by rewriting the sockpol.exe code. ^.^Y