Example #1
0
 public static DisposableRealmPacketIn CreateFromOutPacket(BufferSegment segment, RealmPacketOut packet)
 {
     byte[] finalizedPacket = packet.GetFinalizedPacket();
     return(DisposableRealmPacketIn.Create(packet.PacketId, finalizedPacket, packet.HeaderSize,
                                           finalizedPacket.Length - packet.HeaderSize, segment));
 }
Example #2
0
 public static DisposableRealmPacketIn CreateFromOutPacket(RealmPacketOut packet)
 {
     byte[] finalizedPacket = packet.GetFinalizedPacket();
     return(DisposableRealmPacketIn.CreateFromOutPacket(finalizedPacket, 0, finalizedPacket.Length));
 }
Example #3
0
        //public override void Dispose()
        //{
        //    base.Dispose();
        //    _segment.Free();
        //}

        public static DisposableRealmPacketIn CreateFromOutPacket(RealmPacketOut packet)
        {
            var oldBuf = packet.GetFinalizedPacket();

            return(CreateFromOutPacket(oldBuf, 0, oldBuf.Length));
        }
Example #4
0
        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 #5
0
        public static PinnedRealmPacketIn CreateFromOutPacket(RealmPacketOut packet)
        {
            var oldBuf = packet.GetFinalizedPacket();

            return(CreateFromOutPacket(oldBuf));
        }