Class NetworkReaderPool
Pool of NetworkReaders to avoid allocations.
Inheritance
NetworkReaderPool
Assembly: doc.dll
Syntax
public static class NetworkReaderPool : object
Methods
|
Improve this Doc
View Source
Get(ArraySegment<Byte>)
Get the next reader in the pool. If pool is empty, creates a new Reader
Declaration
public static NetworkReaderPooled Get(ArraySegment<byte> segment)
Parameters
Type |
Name |
Description |
ArraySegment<Byte> |
segment |
|
Returns
|
Improve this Doc
View Source
Get(Byte[])
Get the next reader in the pool. If pool is empty, creates a new Reader
Declaration
public static NetworkReaderPooled Get(byte[] bytes)
Parameters
Type |
Name |
Description |
Byte[] |
bytes |
|
Returns
|
Improve this Doc
View Source
GetReader(ArraySegment<Byte>)
Declaration
public static NetworkReaderPooled GetReader(ArraySegment<byte> segment)
Parameters
Type |
Name |
Description |
ArraySegment<Byte> |
segment |
|
Returns
|
Improve this Doc
View Source
GetReader(Byte[])
Declaration
public static NetworkReaderPooled GetReader(byte[] bytes)
Parameters
Type |
Name |
Description |
Byte[] |
bytes |
|
Returns
|
Improve this Doc
View Source
Recycle(NetworkReaderPooled)
Declaration
public static void Recycle(NetworkReaderPooled reader)
Parameters
|
Improve this Doc
View Source
Return(NetworkReaderPooled)
Returns a reader to the pool.
Declaration
public static void Return(NetworkReaderPooled reader)
Parameters