|
Mirror Networking
|
Network Writer for most simple types like floats, ints, buffers, structs, etc. Use NetworkWriterPool.GetReader() to avoid allocations. More...
Public Member Functions | |
| void | Reset () |
| Reset both the position and length of the stream More... | |
| byte[] | ToArray () |
| Copies buffer until 'Position' to a new array. More... | |
| ArraySegment< byte > | ToArraySegment () |
| Returns allocation-free ArraySegment until 'Position'. More... | |
| void | WriteByte (byte value) |
| void | WriteBytes (byte[] buffer, int offset, int count) |
| void | Write< T > (T value) |
| Writes any type that mirror supports. Uses weaver populated Writer(T).write. More... | |
Public Attributes | |
| int | Position |
| Next position to write to the buffer More... | |
Static Public Attributes | |
| const int | MaxStringLength = 1024 * 32 |
Network Writer for most simple types like floats, ints, buffers, structs, etc. Use NetworkWriterPool.GetReader() to avoid allocations.
Definition at line 9 of file NetworkWriter.cs.
| void Mirror.NetworkWriter.Reset | ( | ) |
Reset both the position and length of the stream
Definition at line 25 of file NetworkWriter.cs.
| byte[] Mirror.NetworkWriter.ToArray | ( | ) |
Copies buffer until 'Position' to a new array.
Definition at line 45 of file NetworkWriter.cs.
| ArraySegment< byte > Mirror.NetworkWriter.ToArraySegment | ( | ) |
Returns allocation-free ArraySegment until 'Position'.
Definition at line 54 of file NetworkWriter.cs.
| void Mirror.NetworkWriter.Write< T > | ( | T | value | ) |
Writes any type that mirror supports. Uses weaver populated Writer(T).write.
Definition at line 184 of file NetworkWriter.cs.
| void Mirror.NetworkWriter.WriteBytes | ( | byte[] | buffer, |
| int | offset, | ||
| int | count | ||
| ) |
Definition at line 175 of file NetworkWriter.cs.
|
static |
Definition at line 11 of file NetworkWriter.cs.
| int Mirror.NetworkWriter.Position |
Next position to write to the buffer
Definition at line 19 of file NetworkWriter.cs.