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