Ok... So how detect when socket is dying, when I lost the internet, for example, I can't send a command from server side.
Version : 1.1.2-dev Thanks! Em segunda-feira, 7 de outubro de 2013 13h51min08s UTC-3, Louis Charette escreveu: > I didn't test, but from what I know of sockets maybe the event is fired > only if the socket itself is closed from the server (from a server side > command). Killing ape won't fire the socket event since ape client is > killed before the event can fire. > > I'll test later when I get home. > > Which version of the server are you using? > > Envoyé de mon iPhone > > Le 2013-10-07 à 09:46, Pablo Zandoná <[email protected] <javascript:>> > a écrit : > > Thank you for atention! > > I try this event onclose, but too don't work. > > If you test this example, > http://ape-project.org/wiki/index.php/index.php?page=JS+TCP+-+socket , > onclose too dont work. I dont know why. > > For test, I killed the aped process, and in the this exact time the > requisition GET, an error signaled on browser terminal, so I have thought > who should call to method onclose. > > Some idea? > > Thanks! > > > > Em sábado, 5 de outubro de 2013 14h40min56s UTC-3, Louis Charette escreveu: >> >> Got lost for a minute here. *TCPSocket* is an alias to* APE.PipeProxy*. >> That's why I couldn't find it in the doc at first. >> >> In that case, if I look at the client file *PipeProxy.js* ( >> https://github.com/APE-Project/APE_JSF/blob/master/Source/Pipe/PipeProxy.js), >> >> it should be "*onclose*" and not "onDisconnect". >> >> See documentation for more details on PipeProxy here: >> http://ape-project.org/static/jsdocs/client/symbols/APE.PipeProxy.html and >> the events here : >> http://ape-project.org/static/jsdocs/client/symbols/APE.html >> >> >> - Louis >> >> Le 2013-10-04 à 09:47, Pablo Zandoná <[email protected]> a écrit : >> >> Hello! >> >> I have a sockClient on my app, but when I kill the aped on my server, the >> event don't call onDisconnect function. Why? >> >> My socket: >> >> var client = new APE.Client(); >> >> var coreApe = null; >> >> var TCPSocket = null; >> >> var socketCore = null; >> >> client.load(); >> >> >> client.addEvent('load', function() { >> >> TCPSocket = this.core.TCPSocket; >> coreApe = this.core; >> coreApe.start(); >> }); >> client.addEvent('ready', function() { >> socketCore = new TCPSocket(); >> socketCore.open(IP_CORE, PORTA_CORE); >> >> socketCore.onopen = function() { >> >> log_('Socket CORE conectado!'); >> >> }; >> >> socketCore.onread = function(data) { >> data = utf8_decode(data); >> json = stringToJson(data); >> InterfaceClientCore.callback(json); >> }; >> >> socketCore.onDisconnect = function() { >> log_('socket.onDisconnect'); >> } >> >> }); >> >> Thanks! >> >> >> -- >> -- >> You received this message because you are subscribed to the Google >> Groups "APE Project" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/ape-project?hl=en >> --- >> APE Project (Ajax Push Engine) >> Official website : http://www.ape-project.org/ >> Git Hub : http://github.com/APE-Project/ >> >> --- >> You received this message because you are subscribed to the Google Groups >> "APE Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> -- > -- > You received this message because you are subscribed to the Google > Groups "APE Project" group. > To post to this group, send email to [email protected]<javascript:> > To unsubscribe from this group, send email to > [email protected] <javascript:> > For more options, visit this group at > http://groups.google.com/group/ape-project?hl=en > --- > APE Project (Ajax Push Engine) > Official website : http://www.ape-project.org/ > Git Hub : http://github.com/APE-Project/ > > --- > You received this message because you are subscribed to the Google Groups > "APE Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/ --- You received this message because you are subscribed to the Google Groups "APE Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
