Exemplo n.º 1
0
        void SendMsg()
        {
            CellWriteStream s = new CellWriteStream(256);

            s.SetNetCmd(NetCmd.LOGOUT);

            s.WriteInt8(1);
            s.WriteInt16(2);
            s.WriteInt32(3);
            s.WriteFloat(4.3f);
            s.WriteDouble(5.6f);

            string str = "测试字符串___1 client";

            s.WriteString(str);
            string a = "测试字符串___2 ahah";

            s.WriteString(a);
            int[] b = { 1, 2, 3, 4, 5 };
            s.WriteInt32s(b);
            s.Finish();

            SendData(s);
            s.Release();
        }
Exemplo n.º 2
0
 public int SendData(CellWriteStream ws)
 {
     if (_cppClientObj == IntPtr.Zero && ws != null)
     {
         return(0);
     }
     return(CELLClient_SendWriteStream(_cppClientObj, ws.cppObj));
 }