Class PacketFilterQueue
java.lang.Object
com.comphenix.protocol.injector.netty.PacketFilterQueue
Stores packets that need to be sent without being handled by the listeners (filtered=false).
When other packets sent after sending the packet are removed, the packet is removed as well
to prevent a memory leak, assuming a consistent send order is in place.
- Author:
- bergerkiller
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a packet to this queue, indicating further on that it should not be filtered.booleanChecks whether a packet is contained inside this queue, indicating it should not be filtered.booleanChecks whether a packet is contained inside this queue and removes it if so.
-
Constructor Details
-
PacketFilterQueue
public PacketFilterQueue()
-
-
Method Details
-
add
Adds a packet to this queue, indicating further on that it should not be filtered.- Parameters:
packet-
-
contains
Checks whether a packet is contained inside this queue, indicating it should not be filtered.- Parameters:
packet-- Returns:
- True if contained and packet should not be filtered (filtered=false)
-
remove
Checks whether a packet is contained inside this queue and removes it if so. Other packets marked in this queue that were sent before this packet are removed from the queue also, avoiding memory leaks because of dropped packets.- Parameters:
packet-- Returns:
- True if contained and packet should not be filtered (filtered=false)
-