mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 19:10:32 +00:00
NetworkReader/WriterPool: expose Count for testing
This commit is contained in:
parent
16e2cfab2f
commit
78d511f65f
@ -17,6 +17,9 @@ public static class NetworkReaderPool
|
|||||||
1000
|
1000
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// expose count for testing
|
||||||
|
public static int Count => Pool.Count;
|
||||||
|
|
||||||
/// <summary>Get the next reader in the pool. If pool is empty, creates a new Reader</summary>
|
/// <summary>Get the next reader in the pool. If pool is empty, creates a new Reader</summary>
|
||||||
public static NetworkReaderPooled Get(byte[] bytes)
|
public static NetworkReaderPooled Get(byte[] bytes)
|
||||||
{
|
{
|
||||||
|
@ -18,6 +18,9 @@ public static class NetworkWriterPool
|
|||||||
1000
|
1000
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// expose count for testing
|
||||||
|
public static int Count => Pool.Count;
|
||||||
|
|
||||||
/// <summary>Get a writer from the pool. Creates new one if pool is empty.</summary>
|
/// <summary>Get a writer from the pool. Creates new one if pool is empty.</summary>
|
||||||
public static NetworkWriterPooled Get()
|
public static NetworkWriterPooled Get()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user