Devristo/phpws — pull request #18 by sfranzyshen (2013-11-10 15:19:33+00:00)
Title: Added public function getMessages()

Added the public function getMessages() so that one can test the status of the _messages array without the need to call the readMessage() function (blocking loop).

Instead of:

// Wait for an incoming message
$msg = $client->readMessage(); // blocking loop

New usage:

if($client->getMessages()) // non-blocking
___$msg = $client->readMessage();