I wrote a small netty server program. It is working with all phones, but server sends RST request for only android mobile(Client). And some times working fine but some times got the problem.
Help me.
ChannelFactory factory = new NioServerSocketChannelFactory(
Executors.newCachedThreadPool(),
Executors.newCachedThreadPool());
bootstrap = new ServerBootstrap(factory);
bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
public ChannelPipeline getPipeline() {
// new SslHandler(getSSLEngine()),
return Channels.pipeline(
new MobileDecoder(),
new MobileChannelHandler(MobileMessageHandler
.getInstance()));
}
});
bootstrap.setOption("child.tcpNoDelay", true);
bootstrap.setOption("child.keepAlive", true);
bootstrap.bind(new InetSocketAddress(9083));
You might want to try
OioServerSocketChannelFactory. A lot of Android devices were shipped with buggy NIO implementation.