change cmd  data type from short to int

change cmd  data type in Packet.java from short to int
fix SocketServer.server not intialized error
remove hasStartedReading field