コード例 #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));
 }
コード例 #2
0
 public static DisposableRealmPacketIn CreateFromOutPacket(RealmPacketOut packet)
 {
     byte[] finalizedPacket = packet.GetFinalizedPacket();
     return(DisposableRealmPacketIn.CreateFromOutPacket(finalizedPacket, 0, finalizedPacket.Length));
 }
コード例 #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));
        }
コード例 #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));
        }
コード例 #5
0
        public static PinnedRealmPacketIn CreateFromOutPacket(RealmPacketOut packet)
        {
            var oldBuf = packet.GetFinalizedPacket();

            return(CreateFromOutPacket(oldBuf));
        }