Mercurial > hg > Database > jungle-sharp
view Test/jungle-network/operations/NetworkPutAttributeOperationTest.cs @ 20:1f99e150f336
fix folder and add Object Mapper.
author | Kazuma Takeda |
---|---|
date | Thu, 15 Dec 2016 22:52:48 +0900 |
parents | |
children | 1466993c104c |
line wrap: on
line source
using UnityEngine; using System.Collections; using MsgPack; using System; using JungleDB; public class NetworkPutAttributeOperationTest : MonoBehaviour { // Use this for initialization void Start () { byte[] value = System.Text.ASCIIEncoding.UTF8.GetBytes("test"); NetworkPutAttributeOperation op = new NetworkPutAttributeOperation("hoge", value); ObjectPacker pack = new ObjectPacker(); // send this byte to server. byte[] packValue = pack.Pack(op); ObjectPacker unpack = new ObjectPacker(); NetworkPutAttributeOperation nOp = unpack.Unpack<NetworkPutAttributeOperation>(packValue); print(System.Text.ASCIIEncoding.UTF8.GetString(nOp.getValue())); print (nOp.getCommand()); } }