shirioko/WhatsAPI — pull request #1 by jonnywilliamson (2013-04-15 17:22:36+00:00)
Title: Create a waitforserver function to ensure request is processed

As discussed in https://github.com/venomous0x/WhatsAPI/issues/320

This is my attempt of creating a function that forces whatsapi to wait until it receives acknowledgement that the request it sent (message/update status etc) has been processes by the server.

I have found that whatsapi seems to just blast off a request without ever waiting for a response and so most of my requests/messages always fail.

Having this wait function in here, slows down the sending process by 0.5 of a second or so, but has been very solid since I started using it.

Is this the correct way to do it? I not 100% sure, but it seems to be working well.