Class UdpMulticastServer

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
org.drasyl.handler.remote.UdpMulticastServer
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

@Sharable @UnstableApi public class UdpMulticastServer extends io.netty.channel.ChannelInboundHandlerAdapter
Starts an UDP server which joins a IP multicast group and together with the LocalNetworkDiscovery is responsible for discovering other nodes in the local network.
See Also:
  • Nested Class Summary

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

    io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final InetSocketAddress
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    UdpMulticastServer(io.netty.channel.EventLoopGroup group, Function<io.netty.channel.ChannelHandlerContext,io.netty.channel.ChannelInitializer<io.netty.channel.socket.DatagramChannel>> channelInitializerSupplier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    channelActive(io.netty.channel.ChannelHandlerContext ctx)
     
    void
    channelInactive(io.netty.channel.ChannelHandlerContext ctx)
     

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerAdded, 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

    handlerAdded, handlerRemoved
  • Field Details

  • Constructor Details

    • UdpMulticastServer

      public UdpMulticastServer(io.netty.channel.EventLoopGroup group, Function<io.netty.channel.ChannelHandlerContext,io.netty.channel.ChannelInitializer<io.netty.channel.socket.DatagramChannel>> channelInitializerSupplier)
      Parameters:
      group - the EventLoopGroup the underlying udp server should run on
      channelInitializerSupplier -
  • Method Details

    • channelActive

      public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      channelActive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelActive in class io.netty.channel.ChannelInboundHandlerAdapter
    • channelInactive

      public void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      channelInactive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter