Exemplo n.º 1
0
    public int GetBodySize(MessagePacket header)
    {
        ByteBuffer bb = header.GetByteBuffer();

        _head = new P32M32Header(bb);
        return(_head.GetBodySz());
    }
Exemplo n.º 2
0
    bool HandleMsg(P32M32Header header, byte[] body, int handleCount)
    {
        ByteBuffer bb = new ByteBuffer(body);

        switch (header.cmd)
        {
        case 3:
        {
            string name    = bb.ReadString();
            string content = bb.ReadString();
            string show    = string.Format("recv [{0}]:{1}", name, content);
            ZLog.D(null, show);
            if (null != ChatEvent)
            {
                ChatEvent(show);
            }
            break;
        }
        }
        return(true);
    }
Exemplo n.º 3
0
 public P32M32SendMsg(uint cmd, byte[] data)
 {
     head = new P32M32Header(cmd, data.Length);
     body = data;
 }