예제 #1
0
 private void WriteDeliveryCacheProgressImpl(ServiceCtx context, IpcRecvListBuffDesc ipcDesc, DeliveryCacheProgressImpl deliveryCacheProgress)
 {
     using (MemoryStream memory = new MemoryStream((int)ipcDesc.Size))
         using (BinaryWriter bufferWriter = new BinaryWriter(memory))
         {
             bufferWriter.WriteStruct(deliveryCacheProgress);
             context.Memory.Write((ulong)ipcDesc.Position, memory.ToArray());
         }
 }
예제 #2
0
        private void WriteClockSnapshotFromBuffer(ServiceCtx context, IpcRecvListBuffDesc ipcDesc, ClockSnapshot clockSnapshot)
        {
            Debug.Assert(ipcDesc.Size == Marshal.SizeOf <ClockSnapshot>());

            MemoryStream memory = new MemoryStream((int)ipcDesc.Size);

            using (BinaryWriter bufferWriter = new BinaryWriter(memory))
            {
                bufferWriter.WriteStruct(clockSnapshot);
            }

            context.Memory.WriteBytes(ipcDesc.Position, memory.ToArray());
            memory.Dispose();
        }
예제 #3
0
 private void WriteClockSnapshotFromBuffer(ServiceCtx context, IpcRecvListBuffDesc ipcDesc, ClockSnapshot clockSnapshot)
 {
     MemoryHelper.Write(context.Memory, ipcDesc.Position, clockSnapshot);
 }
 private long WriteDeliveryCacheProgressImpl(ServiceCtx context, IpcRecvListBuffDesc ipcDesc, DeliveryCacheProgressImpl deliveryCacheProgress)
 {
     return(MemoryHelper.Write(context.Memory, ipcDesc.Position, deliveryCacheProgress));
 }