示例#1
0
    private void OnGetList(byte[] buffer)
    {
        Mail_Get_ListProto proto = Mail_Get_ListProto.GetProto(buffer);

        Debug.Log("Count" + proto.Count);
        Debug.Log("MailID:" + proto.MailID);
        Debug.Log("MailName:" + proto.MailName);
    }
示例#2
0
        private void OnRequestList(Role role, byte[] buffer)
        {
            Console.WriteLine("客户端请求邮件列表");

            Mail_Get_ListProto proto = new Mail_Get_ListProto();

            proto.Count    = 30;
            proto.MailID   = 102;
            proto.MailName = "名称";
            role.client_Socket.SendMsg(proto.ToArray());
        }
示例#3
0
    public static Mail_Get_ListProto GetProto(byte[] buffer)
    {
        Mail_Get_ListProto proto = new Mail_Get_ListProto();

        using (MMO_MemoryStream ms = new MMO_MemoryStream(buffer))
        {
            proto.Count    = ms.ReadInt();
            proto.MailID   = ms.ReadInt();
            proto.MailName = ms.ReadUTF8String();
        }
        return(proto);
    }