ConnectionlessBootstrap UDP on network
이희승 (Trustin Lee)
trustin at gmail.com
Fri Aug 26 00:11:22 EDT 2011
Hi,
The "remoteAddress" option is not picked up by bind() but by connect(). I guess you intended to call connect() instead of bind()? I'd recommend you to use the connect() method with the two parameters.
HTH
--
Trustin Lee (http://gleamynode.net/)
On Thursday, August 25, 2011 at 11:35 PM, rBlitz wrote:
> Hi,
>
> I'm a new Netty user and I want to test a simple UDP client.
> I have on th other side, an C++ UDP producer.
>
> All is alrigth when I check it on my computer with 127.0.0.1 or my IP but
> when I try to connect my netty to an other pc ... nothing happens... an idea
> ?
>
> This is my code :
>
> DatagramChannelFactory f =
> new NioDatagramChannelFactory(Executors.newCachedThreadPool());
>
> bootstrap = new ConnectionlessBootstrap(f);
>
> //Set up handler
> final UDPClientHandler handler = new UDPClientHandler(this, name);
>
> // Set up the pipeline factory.
> bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
> public ChannelPipeline getPipeline() throws Exception {
> return Channels.pipeline(handler);}
> });
>
>
> bootstrap.setOption("receiveBufferSizePredictorFactory",
> new FixedReceiveBufferSizePredictorFactory(65500));
>
> bootstrap.setOption("reuseAddress", true);
>
> bootstrap.setOption("remoteAddress", ip);
> bootstrap.bind(new InetSocketAddress(port));
> }
>
> Thanks in advance!
>
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/ConnectionlessBootstrap-UDP-on-network-tp6724676p6724676.html
> Sent from the Netty User Group mailing list archive at Nabble.com (http://Nabble.com).
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org (mailto:netty-users at lists.jboss.org)
> https://lists.jboss.org/mailman/listinfo/netty-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20110826/f161dc62/attachment.html
More information about the netty-users
mailing list