Beispiel #1
0
        void SendMsg_2()
        {
            CellSendStream s = new CellSendStream(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();
        }
Beispiel #2
0
 public int SendData(CellSendStream ss)
 {
     return(SendData(ss.Array));
 }