On 03/11/2014 12:13, Julien Wajsberg wrote:

Le 31/10/2014 14:39, Jan Jongboom a écrit :


I know on Android that if you have a socket open and the device goes to sleep 
it will not reply to the ACK messages from the server, rendering the socket 
useless. I guess we have something special to keep the Simple Push socket 
alive, can someone shed some light on this?

(Background info: I want a permanent socket connection and don't wanna use 
Simple Push, so far the socket seems to keep being alive but I don't think it 
will last forever)




I think WebSocket is handling this automatically, see the RFC at [1].

[1] http://tools.ietf.org/html/rfc6455#section-7.2

SimplePush uses an alarm to send a application level ping to the server (see 
[2] ). The alarm awakes the CPU for a little while, so even if the device is 
sleeping it will awake, send the ping and then go back to sleep.


[2] http://mxr.mozilla.org/mozilla-central/source/dom/push/PushService.jsm#864








_______________________________________________
dev-b2g mailing list
[email protected]<mailto:[email protected]>
https://lists.mozilla.org/listinfo/dev-b2g



________________________________

Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede 
contener información privilegiada o confidencial y es para uso exclusivo de la 
persona o entidad de destino. Si no es usted. el destinatario indicado, queda 
notificado de que la lectura, utilización, divulgación y/o copia sin 
autorización puede estar prohibida en virtud de la legislación vigente. Si ha 
recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente 
por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential 
information intended only for the use of the individual or entity named above. 
If the reader of this message is not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this communication 
is strictly prohibited. If you have received this transmission in error, do not 
read it. Please immediately reply to the sender that you have received this 
communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode 
conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa 
ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica 
notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização 
pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem 
por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e 
proceda a sua destruição
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to