due to the “weird” flash sandbox and new firewalls you get with adsl accounts the connecting to the wildfire server on port 80 is difficult, flash actually needs a cross-domain-policy policy file hosted on the same server (dns name) loadanle with a http request or an xml socket request.
So i started looking into the way content switches could forward http request to server x and xmpp sockets to server y, but no luck there (for now)
anyway, if the SocketReader could be made “pluggabel” (or ClientSocketReader) and the method createSession split up in a few overridable methods I dont have to rewrite that class everytime there is a new release
the xml is serverd on the same port as the socket, else you still have to use an port (either for serveing the crossdomain.xml or the jabber socket) that might be firewalled.
The safest assumption is that port 80 is available in most cases. The xml is then loaded using :
request over a socket and after receiving the crossdomain.xml over the socket disconnects.
To be able to use this in Wildfire now i’‘ve hacked it into the SocketReader.createSession() method, but im pretty sure its not the place to put it. (i’'d like to make a FlashClientSocketReader that would take care of it and maybe even listen to a different port)
Anyways, looking somewhat further i’'ve also noticed that just telnetting to the server and typing some non whitespace text does not returns an error and disconnects me.
but then we can use the contentswitch to forward port 80 to 5222 on the wildfire server (still can get used to the new name)
anyway, an other option we are looking into is using a http header so the content switch can use its build in understanding of http to use the host header to forward xmpp to port 5222 and all other request to port 80
This way Wildfire can listen to port 80 on a reserved IP. I use
System.security.loadPolicyFile(“xmlsocket://” + server + “:80”);
/code
to connect and it works fine. The only problem is an exception gets thrown each time I connect; “connection closed before session was created”. But there should be an easy way around this.
A FlashClientSocketReader would probably be a better idea.