接口 BundlerInfo
public interface BundlerInfo
-
嵌套类概要
嵌套类 -
字段概要
字段 -
方法概要
修饰符和类型方法说明static <T extends PacketListener,
P extends BundlePacket<? super T>>
BundlerInfocreateForPacket
(PacketType<P> p_320816_, Function<Iterable<Packet<? super T>>, P> p_265627_, BundleDelimiterPacket<? super T> p_265373_) startPacketBundling
(Packet<?> p_265162_) void
unbundlePacket
(Packet<?> p_265095_, Consumer<Packet<?>> p_265715_) 已过时。default void
unbundlePacket
(Packet<?> bundlePacket, Consumer<Packet<?>> packetSender, io.netty.channel.ChannelHandlerContext context) Unwrap and flattens a bundle packet.
-
字段详细资料
-
BUNDLE_SIZE_LIMIT
static final int BUNDLE_SIZE_LIMIT- 另请参阅:
-
-
方法详细资料
-
createForPacket
static <T extends PacketListener,P extends BundlePacket<? super T>> BundlerInfo createForPacket(PacketType<P> p_320816_, Function<Iterable<Packet<? super T>>, P> p_265627_, BundleDelimiterPacket<? super T> p_265373_) -
unbundlePacket
已过时。UseunbundlePacket(Packet, Consumer, io.netty.channel.ChannelHandlerContext)
instead, as it supports packet filtering and is more efficient. -
unbundlePacket
default void unbundlePacket(Packet<?> bundlePacket, Consumer<Packet<?>> packetSender, io.netty.channel.ChannelHandlerContext context) Unwrap and flattens a bundle packet. Then sends the packets contained in the bundle, bracketing them in delimiter packets if need be.- 参数:
bundlePacket
- The bundle packet to write.packetSender
- The packet sender.context
- The network context.- Implementation Note:
- This implementation should filter out packets which are not sendable on the current context, however to preserve compatibility the default implementation does not do this.
-
startPacketBundling
-
unbundlePacket(Packet, Consumer, io.netty.channel.ChannelHandlerContext)
instead, as it supports packet filtering and is more efficient.