Implemented the long awaited packet read functionality.