Mercurial > hg > Database > jungle-sharp
view Test/jungle-network/operations/NetworkPutAttributeOperationTest.cs @ 41:bd44baa491a9 default tip
add TestJungleCore.cs
author | Kazuma Takeda |
---|---|
date | Thu, 23 Feb 2017 17:19:55 +0900 |
parents | e954d456665c |
children |
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 (nOp.getCommand()); } }