beetle 2.7海量消息广播测试

由于client资源限制,只进行了300物体互动广播测试;物体活动频率是每秒20次,服务器每秒转发的消息量大概180W条。

转发消息结构:

    class Po : IMessage
    {
        public int ID;
        public short X;
        public short Y;
        public short Type;
        public void Load(BufferStream reader)
        {
            ID = reader.ReadInt();
            X = reader.ReadShort();
            Y = reader.ReadShort();
            Type = reader.ReadShort();
        }
        public void Save(BufferStream writer)
        {
            writer.Write(ID);
            writer.Write(X);
            writer.Write(Y);
            writer.Write(Type);
        }
    }
posted @ 2013-07-21 20:35  beetlex  阅读(1239)  评论(4编辑  收藏  举报