Click or drag to resize

NetDataWriterAsReadOnlySpan Method

Returns a ReadOnlySpanT representing the currently used portion of the internal buffer.

Namespace: LiteNetLib.Utils
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.2.1.0 (2026.2.1.0)
Syntax
C#
public ReadOnlySpan<byte> AsReadOnlySpan()

Return Value

ReadOnlySpanByte
A ReadOnlySpanT from index 0 to _position.
Remarks
Provides a high-performance, zero-allocation view of the data. The span becomes invalid if the internal buffer is resized or if _position changes.
See Also