These are the modifications that i have made in the chat example:
class Server
{
public static var clients = new List<ClientData>();
static function initClientApi( scnx : haxe.remoting.SocketConnection, server :
neko.net.RemotingServer ) { trace("Client connected"); var c = new
ClientData(scnx); server.addObject("api",c); }
static function onClientDisconnected( scnx ) { trace("Client disconnected");
ClientData.ofConnection(scnx).leave(); } static function onXml( cnx :
haxe.remoting.SocketConnection, data : String ) { trace("a"+data);
cnx.getProtocol().socket.write("<cross-domain-policy><allow-access-from
domain=\"*\" /></cross-domain-policy>") ; } static function
readClientMessage( cnx : haxe.remoting.SocketConnection, buf : String, pos :
Int, len : Int ) : { msg : String, bytes : Int} { trace(buf); return null; }
static function clientMessage( cnx : haxe.remoting.SocketConnection, msg :
String ) { trace( msg); }
static function main() { var s = new neko.net.ThreadRemotingServer();
s.initClientApi = initClientApi; s.clientDisconnected = onClientDisconnected;
s.onXml=onXml; s.readClientMessage = readClientMessage;
s.clientMessage=clientMessage; s.run("localhost",1024); } }
And after many tests, i can say that i dont go in the onXml function and i get
of course "<policy-file-request/>" in readClientMessage function... How is it
possible ?
Mike
From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: [Neko] Installing libgc1Date:
Sun, 20 Jul 2008 22:54:35 +0200
you mean that only neko.net.ThreadRemotingServer.onXml works with new policy
security ??> Date: Sun, 20 Jul 2008 22:38:33 +0200> From: [EMAIL PROTECTED]>
To: [email protected]> Subject: Re: [Neko] Installing libgc1> > [...]>
> I get all the time policy-file-request on server and i dont understand > >
why because i have put the crossdomain.xml to the trunk. Loadpolicyfile > > and
put a server on port 843 doesnt work too...> > Yes, because this is the way the
new flash security works (changed in > latest FP9 release).> > You have to give
a proper answer to the policy-file-request, by sending > a crossdomain.xml
answer. This can be handled by using > ThreadRemotingServer.onXml> > Best,>
Nicolas> > -- > Neko : One VM to run them all> (http://nekovm.org)
Tous vos amis discutent sur Messenger, et vous ? Téléchargez Messenger, c'est
gratuit !
_________________________________________________________________
Retouchez, classez et partagez vos photos gratuitement avec le logiciel Galerie
de Photos !
http://www.windowslive.fr/galerie/
--
Neko : One VM to run them all
(http://nekovm.org)