Fix/add some more packages according to protocol changes. Introduce LimitedStream to make the network reading more safe.