Class NetworkWriter
Network Writer for most simple types like floats, ints, buffers, structs, etc. Use NetworkWriterPool.GetReader() to avoid allocations.
Inheritance
NetworkWriter
Assembly: doc.dll
Syntax
public class NetworkWriter : object
Fields
|
Improve this Doc
View Source
MaxStringLength
Declaration
public const int MaxStringLength = null
Field Value
|
Improve this Doc
View Source
Position
Next position to write to the buffer
Declaration
Field Value
Methods
|
Improve this Doc
View Source
Reset()
Reset both the position and length of the stream
Declaration
|
Improve this Doc
View Source
ToArray()
Copies buffer until 'Position' to a new array.
Declaration
Returns
|
Improve this Doc
View Source
ToArraySegment()
Returns allocation-free ArraySegment until 'Position'.
Declaration
public ArraySegment<byte> ToArraySegment()
Returns
Type |
Description |
ArraySegment<Byte> |
|
|
Improve this Doc
View Source
Write<T>(T)
Writes any type that mirror supports. Uses weaver populated Writer(T).write.
Declaration
public void Write<T>(T value)
Parameters
Type |
Name |
Description |
T |
value |
|
Type Parameters
|
Improve this Doc
View Source
WriteByte(Byte)
Declaration
public void WriteByte(byte value)
Parameters
Type |
Name |
Description |
Byte |
value |
|
|
Improve this Doc
View Source
WriteBytes(Byte[], Int32, Int32)
Declaration
public void WriteBytes(byte[] buffer, int offset, int count)
Parameters
Extension Methods