Class PacketPool<T>
Object pool for packets, allowing for packets to be reused instead of continuously be reallocated.
Using this reduces the amount of garbage collection invocations.
Inheritance
PacketPool<T>
Assembly: SlipeServer.Server.dll
Syntax
public class PacketPool<T> where T : Packet, new()
Type Parameters
Constructors
|
Edit this page
View Source
PacketPool(int?)
Declaration
public PacketPool(int? maxPacketCount = -1)
Parameters
Type |
Name |
Description |
int? |
maxPacketCount |
|
Methods
|
Edit this page
View Source
GetPacket()
Declaration
Returns
|
Edit this page
View Source
ReturnPacket(T)
Declaration
public void ReturnPacket(T packet)
Parameters
Type |
Name |
Description |
T |
packet |
|