Java 类net.minecraft.util.io.netty.channel.ChannelFutureListener 实例源码
项目:CraftBukkit
文件:NetworkManager.java
private void b(Packet packet, GenericFutureListener[] agenericfuturelistener) {
EnumProtocol enumprotocol = EnumProtocol.a(packet);
EnumProtocol enumprotocol1 = (EnumProtocol) this.m.attr(d).get();
if (enumprotocol1 != enumprotocol) {
i.debug("Disabled auto read");
this.m.config().setAutoRead(false);
}
if (this.m.eventLoop().inEventLoop()) {
if (enumprotocol != enumprotocol1) {
this.a(enumprotocol);
}
this.m.writeAndFlush(packet).addListeners(agenericfuturelistener).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
} else {
this.m.eventLoop().execute(new QueuedProtocolSwitch(this, enumprotocol, enumprotocol1, packet, agenericfuturelistener));
}
}
项目:Tweakkit-Server
文件:NetworkManager.java
private void b(Packet packet, GenericFutureListener[] agenericfuturelistener) {
EnumProtocol enumprotocol = EnumProtocol.a(packet);
EnumProtocol enumprotocol1 = (EnumProtocol) this.m.attr(d).get();
if (enumprotocol1 != enumprotocol) {
i.debug("Disabled auto read");
this.m.config().setAutoRead(false);
}
if (this.m.eventLoop().inEventLoop()) {
if (enumprotocol != enumprotocol1) {
this.a(enumprotocol);
}
this.m.writeAndFlush(packet).addListeners(agenericfuturelistener).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
} else {
this.m.eventLoop().execute(new QueuedProtocolSwitch(this, enumprotocol, enumprotocol1, packet, agenericfuturelistener));
}
}