Persistent HTTP (Keep Alive) in Unity WebPlayer

Hi Guys,

Our multiplayer has an HTTP only mode, in which all communications are done through port 80 only (not even using 843 for the socketpolicy).

Considering that and the WebPlayer limitations, is it:

  1. Possible to work with keep alive connections (telling the TCP to not close and open a channel for each request)?
  2. Possible to do that using the WWW class? (it seems the WWW class requests are already set with keep alive header…)

Thanks.

It should be possible using sockets [needs policy].

There’s no magic settings for the WWW class. I’d try experimenting with it [e.g. can one reuse an instance of WWW [doubt it]? What actually happens if you create many - does unity work magic behind the scenes?] - but I’ve not heard of it working.

If sockets are 100% out, and WWW doesn’t work right… the last thing you could do is try http://docs.unity3d.com/Documentation/Manual/UnityWebPlayerandbrowsercommunication.html

But that’s fairly extreme.

Socket Policy is not an option for us.

I was wondering whether WWW does that on its own or not - would be great to hear from Unity employees if that is the case.

Regarding sending requests by communication with the web page - have you any idea what would be the performance impacts of that? Performance might be hindered in a way that would make the whole thing not worth while.

Nope… I’ve never even heard of it been done in this context.

Could someone from Unity shed some light on the possibility or availability of keep-alive from within Unity?

Bump