Exemplo n.º 1
0
 public void send(Int16 cmd, LuaTable table)
 {
     if (m_net != null)
     {
         NetWriteBuffer buff = NetWriteBuffer.CacheBuff;
         PackCall       fun  = table.Get <PackCall>("Pack");
         fun(table, buff);
         m_net.send((Int16)(cmd), buff);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// 将数据写入缓冲区。
 /// </summary>
 /// <param name="buffer">数据缓冲区。</param>
 public void Pack(NetWriteBuffer buffer)
 {
     buffer.WriteInt64(mUID);
     buffer.WriteInt32(mID);
     buffer.WriteInt32(mCount);
     buffer.WriteInt32(mBag);
     buffer.WriteInt32(mPos);
     buffer.WriteInt32(mUseCount);
     buffer.WriteInt32(mTodayUse);
     buffer.WriteInt64(mCanUseVal);
     buffer.WriteInt64(mFlag);
 }
Exemplo n.º 3
0
        public void send(Int16 cmd, MsgData data = null)
        {
            if (m_net != null)
            {
                NetWriteBuffer buff = NetWriteBuffer.CacheBuff;
                if (data != null)
                {
                    data.pack(buff);
                }

                m_net.send((Int16)(cmd), buff);
            }
        }
Exemplo n.º 4
0
        public Int16 m_PackHeaderIndex = 1;//包的序列号,从0 ~9999 ,必须循环递增

        public void send(Int16 cmd, NetWriteBuffer buffer)
        {
            send(cmd, buffer.Data, buffer.Length);
        }
Exemplo n.º 5
0
 public virtual void pack(NetWriteBuffer buffer)
 {
 }