Encapsulate the pack and unpack data between client and server