Show / Hide Table of Contents

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
object
PacketPool<T>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: SlipeServer.Server.PacketHandling
Assembly: SlipeServer.Server.dll
Syntax
public class PacketPool<T> where T : Packet, new()
Type Parameters
Name Description
T

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
public T GetPacket()
Returns
Type Description
T
| Edit this page View Source

ReturnPacket(T)

Declaration
public void ReturnPacket(T packet)
Parameters
Type Name Description
T packet
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX