cpw.mods.fml.common.network.internal

## Class FMLRuntimeCodec

- java.lang.Object
- - io.netty.channel.ChannelHandlerAdapter
  - - io.netty.channel.ChannelInboundHandlerAdapter
    - - io.netty.channel.ChannelDuplexHandler
      - - io.netty.handler.codec.MessageToMessageCodec<FMLProxyPacket,A>
        - - cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec<FMLMessage>
          - - cpw.mods.fml.common.network.internal.FMLRuntimeCodec

- All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler

      public class FMLRuntimeCodec
      extends FMLIndexedMessageToMessageCodec<FMLMessage>

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

      `io.netty.channel.ChannelHandler.Sharable`

  - ### Field Summary

    - ### Fields inherited from class cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec

      `INBOUNDPACKETTRACKER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FMLRuntimeCodec()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `decodeInto(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf source, FMLMessage msg)`
    `void` | `encodeInto(io.netty.channel.ChannelHandlerContext ctx, FMLMessage msg, io.netty.buffer.ByteBuf target)`
    `protected void` | `testMessageValidity(FMLProxyPacket msg)` Called to verify the message received.

    - ### Methods inherited from class cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec

      `addDiscriminator, decode, encode, exceptionCaught, handlerAdded`

    - ### Methods inherited from class io.netty.handler.codec.MessageToMessageCodec

      `acceptInboundMessage, acceptOutboundMessage, channelRead, write`

    - ### Methods inherited from class io.netty.channel.ChannelDuplexHandler

      `bind, close, connect, deregister, disconnect, flush, read`

    - ### Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

      `channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered`

    - ### Methods inherited from class io.netty.channel.ChannelHandlerAdapter

      `handlerRemoved, isSharable`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface io.netty.channel.ChannelHandler

      `handlerRemoved`

- - ### Constructor Detail

    - #### FMLRuntimeCodec

          public FMLRuntimeCodec()

  - ### Method Detail

    - #### encodeInto

          public void encodeInto(io.netty.channel.ChannelHandlerContext ctx,
                        FMLMessage msg,
                        io.netty.buffer.ByteBuf target)
                          throws java.lang.Exception

      Specified by:
        `encodeInto` in class `FMLIndexedMessageToMessageCodec<FMLMessage>`
      Throws:
        `java.lang.Exception`

    - #### decodeInto

          public void decodeInto(io.netty.channel.ChannelHandlerContext ctx,
                        io.netty.buffer.ByteBuf source,
                        FMLMessage msg)

      Specified by:
        `decodeInto` in class `FMLIndexedMessageToMessageCodec<FMLMessage>`

    - #### testMessageValidity

          protected void testMessageValidity(FMLProxyPacket msg)

      Description copied from class: `FMLIndexedMessageToMessageCodec`
      Called to verify the message received. This can be used to hard disconnect in case of an unexpected packet, say due to a weird protocol mismatch. Use with caution.
      Overrides:
        `testMessageValidity` in class `FMLIndexedMessageToMessageCodec<FMLMessage>`