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 |
---|---|
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, config, doBeginRead, doBind, doClose, doDisconnect, doRegister, doWrite, ensureOpen, finish, inboundMessages, isActive, isCompatible, isOpen, lastInboundBuffer, lastOutboundBuffer, localAddress0, metadata, newUnsafe, outboundMessages, readInbound, readOutbound, remoteAddress0, runPendingTasks, writeInbound, writeOutbound
alloc, bind, bind, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doDeregister, equals, eventLoop, filterOutboundMessage, flush, hashCode, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, localAddress, newFailedFuture, 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)