Changed Connection and Packet class to use shorts for length of data and protocol id