View Single Post
Posts: 8 | Thanked: 3 times | Joined on Feb 2012
#107
Originally Posted by rash.m2k View Post
Some info for you guys doing the dev work - while reading the book one thing was bugging me from the very first chapter and it didn't cover it until it was near the end.

That was power management - since the XMPP is a long lived TCP session which pretty much never expires it's just going to kill the battery, but clearly it doesn’t otherwise it would not have been used.

This power management feature is achieved by something called BOSH, this is where instead of the client keeping the TCP session alive a proxy sits between the client and the server the BOSH Connection Manager (BOSH CM) server keeps the session alive. The client then communicates with the BOSH CM by simple HTTP requests. The client is assigned a session id for this by the BOSH CM.

I’m guessing you guys may have seen something similar – if not it may help you debug some of this stuff.
I think WhatsApp do not use the standard protocol. I went through their code both java and .net, I noticed that they send XML data through the output stream in binary. I am not sure if I can send and receive data in ASCII.