public class FMLEmbeddedChannel
extends io.netty.channel.embedded.EmbeddedChannel
EmbeddedChannel
. Provides some convenience methods
associated with the specific needs of FML network handling.Constructor and Description |
---|
FMLEmbeddedChannel(ModContainer container,
java.lang.String channelName,
Side source,
io.netty.channel.ChannelHandler... handlers) |
FMLEmbeddedChannel(java.lang.String channelName,
Side source,
io.netty.channel.ChannelHandler... handlers) |
Modifier and Type | Method and Description |
---|---|
void |
cleanAttributes() |
java.lang.String |
findChannelHandlerNameForType(java.lang.Class<? extends io.netty.channel.ChannelHandler> type) |
Packet<?> |
generatePacketFrom(java.lang.Object object)
Utility method to generate a regular packet from a custom packet.
|
checkException, close, close, config, disconnect, disconnect, doBeginRead, doBind, doClose, doDisconnect, doRegister, doWrite, ensureOpen, finish, finishAndReleaseAll, flushInbound, flushOutbound, handleInboundMessage, handleOutboundMessage, inboundMessages, isActive, isCompatible, isOpen, lastInboundBuffer, lastOutboundBuffer, localAddress0, metadata, newChannelPipeline, newUnsafe, outboundMessages, readInbound, readOutbound, releaseInbound, releaseOutbound, remoteAddress0, runPendingTasks, runScheduledPendingTasks, writeInbound, writeOneInbound, writeOneInbound, writeOneOutbound, writeOneOutbound, writeOutbound
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, doDeregister, equals, eventLoop, filterOutboundMessage, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, parent, pipeline, read, remoteAddress, toString, unsafe, voidPromise, write, write, writeAndFlush, writeAndFlush
public FMLEmbeddedChannel(java.lang.String channelName, Side source, io.netty.channel.ChannelHandler... handlers)
public FMLEmbeddedChannel(ModContainer container, java.lang.String channelName, Side source, io.netty.channel.ChannelHandler... handlers)
public Packet<?> generatePacketFrom(java.lang.Object object)
FMLIndexedMessageToMessageCodec
,
transforming from mod packets to standard FMLProxyPacket
s.
This is mostly useful in cases where vanilla expects a packet, such as the TileEntity getDescriptionPacket.object
- The inbound packet@Nullable public java.lang.String findChannelHandlerNameForType(java.lang.Class<? extends io.netty.channel.ChannelHandler> type)
public void cleanAttributes()