Writes raw bytes into the message. The bytes that will be written. The amount of bytes to write from the bytes pointer.
(byte* bytes, int length)
| 14 | /// <param name="bytes">The bytes that will be written.</param> |
| 15 | /// <param name="length">The amount of bytes to write from the bytes pointer.</param> |
| 16 | public void WriteBytes(byte* bytes, int length) |
| 17 | { |
| 18 | Assert.IsTrue(Position + length <= BufferSize, $"Could not write data of length {length} into message with id={MessageId}! Current write position={Position}"); |
| 19 | Utils.MemoryCopy(new IntPtr(Buffer + Position), new IntPtr(bytes), (ulong)length); |
| 20 | Position += (uint)length; |
| 21 | Length = Position; |
| 22 | } |
| 23 | |
| 24 | /// <summary> |
| 25 | /// Reads raw bytes from the message into the given byte array. |
nothing calls this directly
no test coverage detected