Very long connecting time
이희승 (Trustin Lee)
trustin at gmail.com
Tue Aug 16 19:36:21 EDT 2011
'remote.getHostName()' might involve a reverse DNS lookup, so that might be causing such delay.
--
Trustin Lee (http://gleamynode.net/)
On Wednesday, August 17, 2011 at 6:07 AM, temper wrote:
> I am just started using netty. I have a simple server binded to two tcp
> ports. One of them is telnet and is almoust a copy of a sample telnet server
> implementation found in netty src.
> I have a remote host with debian (squeeze) with different services started.
>
> When I try to connect to my netty server I got aroung 7 seconds connecting
> delay. After that all goes normal. My onConnect handler:
>
> @Override
> public void channelConnected(ChannelHandlerContext ctx,
> ChannelStateEvent e) throws Exception {
> InetSocketAddress remote =
> (InetSocketAddress)ctx.getChannel().getRemoteAddress();
> Server.logger.info (http://Server.logger.info)("new connection from: " + remote.getHostName() + ":"
> + remote.getPort());
>
> // channel is automatically removed from channel group on disconnection
> Server.allChannels.add(ctx.getChannel());
> }
>
>
> On the other hand if I try to connect another listening ports on remote
> server I got connected without any delay, so that this is not a network
> issue.
>
> What could be the probem?
>
>
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Very-long-connecting-time-tp6692869p6692869.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/20110817/8adece9b/attachment.html
More information about the netty-users
mailing list