Mirror::NetworkReader
Binary stream Reader. Supports simple types, buffers, arrays, structs, and nested types More...
Inherited by PooledNetworkReader
Public Functions
Name | |
---|---|
NetworkReader(byte [] bytes) | |
NetworkReader(ArraySegment< byte > segment) | |
byte | ReadByte() |
int | ReadInt32() |
uint | ReadUInt32() |
long | ReadInt64() |
ulong | ReadUInt64() |
byte [] | ReadBytes(byte [] bytes, int count) |
ArraySegment< byte > | ReadBytesSegment(int count) |
override string | ToString() |
T | Read< T >() Reads any data type that mirror supports |
Public Attributes
Name | |
---|---|
int | Position |
int | Length |
Detailed Description
class Mirror::NetworkReader;
Binary stream Reader. Supports simple types, buffers, arrays, structs, and nested types
Use [NetworkReaderPool.GetReader] to reduce memory allocation
Public Functions Documentation
function NetworkReader
inline NetworkReader(
byte [] bytes
)
function NetworkReader
inline NetworkReader(
ArraySegment< byte > segment
)
function ReadByte
inline byte ReadByte()
function ReadInt32
int ReadInt32()
function ReadUInt32
inline uint ReadUInt32()
function ReadInt64
long ReadInt64()
function ReadUInt64
inline ulong ReadUInt64()
function ReadBytes
inline byte [] ReadBytes(
byte [] bytes,
int count
)
function ReadBytesSegment
inline ArraySegment< byte > ReadBytesSegment(
int count
)
function ToString
inline override string ToString()
function Read< T >
inline T Read< T >()
Reads any data type that mirror supports
Template Parameters:
- T
Return:
Public Attributes Documentation
variable Position
int Position;
variable Length
int Length => buffer.Count;
Updated on 21 January 2021 at 20:42:54 UTC