protected function readMessages()
{
$this->messagesLeftToProcess = $this->readInt();
// find the total number of Message elements
while ($this->messagesLeftToProcess--) {
// loop over all of the Message elements
$this->resetReferences();
$target = $this->readUTF();
$response = $this->readUTF();
// the response that the client understands
//$length = $this->readLong(); // grab the length of the Message element
$this->currentByte += 4;
$type = $this->readByte();
// grab the type of the element
$data = $this->readData($type);
// turn the element into real data
$message = new Amfphp_Core_Amf_Message($target, $response, $data);
$this->deserializedPacket->messages[] = $message;
}
}