Class ClientChannelInitializer

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelInitializer<io.netty.channel.socket.SocketChannel>
org.drasyl.peer.connection.DefaultSessionInitializer
org.drasyl.peer.connection.client.ClientChannelInitializer
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler
Direct Known Subclasses:
DefaultClientChannelInitializer

public abstract class ClientChannelInitializer extends DefaultSessionInitializer
Creates a newly configured ChannelPipeline for a connection to a node server.
  • Field Details

    • target

      protected final Endpoint target
  • Constructor Details

    • ClientChannelInitializer

      protected ClientChannelInitializer(int networkId, Identity identity, int flushBufferSize, Duration readIdleTimeout, short pingPongRetries, Endpoint target)
      Initialize a netty Channel for an outbound connection to a node server.
      Parameters:
      networkId - the network the node belongs to
      identity - the node's identity
      flushBufferSize - The size of the flush buffer, to minimize IO overhead. A high value is good for throughput. A low value is good for latency.
      readIdleTimeout - The maximum time that an active connection can spend in idle before the client checks with a PING request whether the remote station is still alive. Note: every long value <= 0 s deactivates the idle function.
      pingPongRetries - The maximum amount that a remote station cannot reply to a PING request in succession in the interval readIdleTimeout. Min value is 1, max 32767
      target - the target URI
  • Method Details