I found that if I just use Java try and cache to get exception, it is 
unavailable to cache netty's exception, so any methods to get exception for 
client connecting, client disconnecting, even writing? here is my netty 
client code:

        final String ip = "127.0.0.1";
        final int port = 9001;
        final EventLoopGroup g = new NioEventLoopGroup();
        final Bootstrap b = new Bootstrap();
        final ChannelFuture f = b.group(g)
                .channel(NioSocketChannel.class)
                .option(ChannelOption.TCP_NODELAY, true)
                .option(ChannelOption.SO_REUSEADDR, true)
                .option(ChannelOption.SO_KEEPALIVE, true)
                .handler(new EchoClientInitializer())
                .connect(ip, port)
                .sync();
        f.channel().closeFuture().sync();
        g.shutdownGracefully();

Thank!

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/cdbd14ce-38a0-4b17-ae65-5874b719a3a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to