Mercurial > hg > Database > jungle-sharp
view src/test/csharp/jp.ac.u-ryukyu.ie.cr/jungle-network/operations/NetworkPutAttributeOperationTest.cs @ 17:01a08cf4b2d9
Liq Files
author | Kazuma |
---|---|
date | Mon, 07 Nov 2016 01:05:24 +0900 |
parents | 4c8932dad7b2 |
children |
line wrap: on
line source
using UnityEngine; using System.Collections; using MsgPack; using System; 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()); } }