Android channel not responding

gaua gaua83 at gmail.com
Sat May 7 18:02:14 EDT 2011


Hi, I am developing Android application and I use netty to create client. 
There is no problem with connecting to server and transfer some data, but
after 30-40 minutes channel is not responding. I checked flags like
isConnected(), isOpen() etc. for this channel and all are true on client and
server. So I think that client is connected to server, but when server sent
any data to client, it do not get it?
Have you got any idea what is going on?

Here is part of my code:

bootstrap = new ClientBootstrap( new NioClientSocketChannelFactory(
                                         Executors.newCachedThreadPool(),
                                         Executors.newCachedThreadPool()));
bootstrap.setPipelineFactory(new SpocoServerPipelineFactory( context ));
bootstrap.setOption("child.tcpNoDelay", true);
bootstrap.setOption("child.keepAlive", true);
bootstrap.setOption("remoteAddress", new InetSocketAddress(host, port));

ChannelFuture future = bootstrap.connect(new InetSocketAddress( host, port
));
channel = future.awaitUninterruptibly().getChannel();
        
if( !future.isSuccess() ) {
    if (lastWriteFuture != null)
        lastWriteFuture.awaitUninterruptibly();
    channel.close().awaitUninterruptibly();
    throw new Exception( "Connection error: "  +
future.getCause().getMessage() );
}  

//connected

--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Android-channel-not-responding-tp6340831p6340831.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list