NetworkSession: inject PacketPool instead of hardcoding it

this will make it slightly easier for multi version implementations, but handlers are still quite a big problem.
This commit is contained in:
Dylan K. Taylor
2020-04-29 12:48:28 +01:00
parent 09e994a026
commit b6214744d5
3 changed files with 11 additions and 4 deletions

View File

@@ -37,8 +37,8 @@ class PacketBatch extends NetworkBinaryStream{
/**
* @throws BinaryDataException
*/
public function getPacket() : Packet{
return PacketPool::getInstance()->getPacket($this->getString());
public function getPacket(PacketPool $packetPool) : Packet{
return $packetPool->getPacket($this->getString());
}
/**