Handle XML errors, else SimpleXML spews notices.
Check init packet.
Buffer socket input.
Verify packet length.