<div>Could you also post the non-Netty code that works? I also would suggest you to remove the decoder from the pipeline just in case of the buggy decoder.<br></div>
<div><br>-- <br><a href="http://gleamynode.net/">Trustin Lee</a><br></div>
<p style="color: #A0A0A8;">On Thursday, August 11, 2011 at 10:50 PM, alex_ab_sw wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div>Hello,<br><br>I am trying to write a component in an application that will listen on UDP<br>for multicast messages, but somehow I don't receive any messages while with<br>a MulticastSocket I can see the messages landing fine.<br><br>Here is the piece of code that I am talking about:<br>---------------------------------------------------------------<br> DatagramChannelFactory channelFactory = new<br>OioDatagramChannelFactory(Executors.newCachedThreadPool());<br> ConnectionlessBootstrap bootstrap = new<br>ConnectionlessBootstrap(channelFactory);<br> <br> bootstrap.setPipelineFactory(new ChannelPipelineFactory() {<br> @Override<br> public ChannelPipeline getPipeline() {<br> return Channels.pipeline(messageDecoder, multicastHandler);<br> }<br> });<br> <br> bootstrap.setOption("receiveBufferSizePredictorFactory", new<br>FixedReceiveBufferSizePredictorFactory(<br> maxPacketSize));<br> <br> <br> <a href="http://logger.info">logger.info</a>("... binding the DatagramChannel on new<br>InetSocketAddress {}:{}", localIpAddress, multicastPort);<br> DatagramChannel datagramChannel = (DatagramChannel)<br> bootstrap.bind(new InetSocketAddress(localIpAddress,<br>multicastPort));<br><br> try {<br> InetAddress multicastAddress =<br>InetAddress.getByName(multicastIpAddress);<br> datagramChannel.joinGroup(multicastAddress);<br> } catch (UnknownHostException e) {<br> shutdown();<br> }<br>------------------------------------------------------------<br>Can you tell if I am doing something wrong, because I see no errors on logs<br>but also no messages coming. The component is deployed on a Linux box with<br>CentOS on it.<br><br>Thanks in advance.<br><br>--<br>View this message in context: <a href="http://netty-forums-and-mailing-lists.685743.n2.nabble.com/UDP-Listener-tp6676456p6676456.html">http://netty-forums-and-mailing-lists.685743.n2.nabble.com/UDP-Listener-tp6676456p6676456.html</a><br>Sent from the Netty User Group mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>netty-users mailing list<br><a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br></div></div></span>
</blockquote>
<div>
<br>
</div>