Example #1
0
		public static PinnedRealmPacketIn CreateFromOutPacket(RealmPacketOut packet)
		{
			var oldBuf = packet.GetFinalizedPacket();
			return CreateFromOutPacket(oldBuf);
		}
		//public override void Dispose()
		//{
		//    base.Dispose();
		//    _segment.Free();
		//}

		public static DisposableRealmPacketIn CreateFromOutPacket(RealmPacketOut packet)
		{
			var oldBuf = packet.GetFinalizedPacket();
			return CreateFromOutPacket(oldBuf, 0, oldBuf.Length);
		}
		public static DisposableRealmPacketIn CreateFromOutPacket(BufferSegment segment, RealmPacketOut packet)
		{
			var bytes = packet.GetFinalizedPacket();
			return Create(packet.PacketId, bytes, packet.HeaderSize, bytes.Length - packet.HeaderSize, segment);
		}
Example #4
0
        static void DoPacketAnalyzr()
        {
            DebugHelper.Init();
            var packet = new RealmPacketOut(RealmServerOpCode.CMSG_MESSAGECHAT, 40);
            packet.Write((uint)ChatMsgType.Guild);
            packet.Write((uint)ChatLanguage.DemonTongue);
            packet.WriteCString("huhu Guild!");

            DebugHelper.DumpPacket(packet.GetFinalizedPacket());
        }