Connect to UDP server
Trustin Lee
tlee at redhat.com
Mon Mar 30 02:18:00 EDT 2009
Thanks for reporting a problem. I forgot to fire a channelOpen event
when an OioDatagramChannel is created by mistake. The fix for the
problem has been checked in:
* https://jira.jboss.org/jira/browse/NETTY-138
Make sure 'svn up' updates OioDatagramChannel.java and build a
snapshot to see if the problem has gone away.
As a quick workaround, you can stop using ClientBootstrap for UDP
transport. Check the QOTM client example.
— Trustin Lee, http://gleamynode.net/
2009/3/30 hezjing <hezjing at gmail.com>:
> Hi
> I'm trying to use Netty 3.1.0 BETA1 and implement an UDP client:
> SocketAddress remoteAddress = new InetSocketAddress(remoteHost,
> remotePort);
> SocketAddress localAddress = new InetSocketAddress(localPort);
> ChannelFactory factory = new
> OioDatagramChannelFactory(Executors.newCachedThreadPool());
> ClientBootstrap bootstrap = new ClientBootstrap(factory);
> logger.info("Going to connect");
> ChannelFuture future = bootstrap.connect(remoteAddress,
> localAddress);
> logger.info("Going to wait");
> future.await();
>
> This is a very dummy client, hence there is no codec and handler.
> When run, the program seems to be stuck at bootstrap.connect() forever ...
> The "Going to connect" is printed but the "Going to wait" is not printed.
>
> ?
>
> --
>
> Hez
>
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
>
More information about the netty-users
mailing list