Use template for add/get in NetworkMessage