<div>'remote.getHostName()' might involve a reverse DNS lookup, so that might be causing such delay.<br></div>
<div><br>-- <br><a href="http://gleamynode.net/">Trustin Lee</a><br></div>
<p style="color: #A0A0A8;">On Wednesday, August 17, 2011 at 6:07 AM, temper wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div>I am just started using netty. I have a simple server binded to two tcp<br>ports. One of them is telnet and is almoust a copy of a sample telnet server<br>implementation found in netty src.<br>I have a remote host with debian (squeeze) with different services started.<br><br>When I try to connect to my netty server I got aroung 7 seconds connecting<br>delay. After that all goes normal. My onConnect handler:<br><br> @Override<br> public void channelConnected(ChannelHandlerContext ctx,<br>ChannelStateEvent e) throws Exception {<br>         InetSocketAddress remote =<br>(InetSocketAddress)ctx.getChannel().getRemoteAddress(); <br>         <a href="http://Server.logger.info">Server.logger.info</a>("new connection from: " + remote.getHostName() + ":"<br>+ remote.getPort());<br>         <br>         // channel is automatically removed from channel group on disconnection<br>         Server.allChannels.add(ctx.getChannel());<br> }<br><br><br>On the other hand if I try to connect another listening ports on remote<br>server I got connected without any delay, so that this is not a network<br>issue.<br><br>What could be the probem?<br><br><br>--<br>View this message in context: <a href="http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Very-long-connecting-time-tp6692869p6692869.html">http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Very-long-connecting-time-tp6692869p6692869.html</a><br>Sent from the Netty User Group mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>netty-users mailing list<br><a href="mailto:netty-users@lists.jboss.org">netty-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/netty-users">https://lists.jboss.org/mailman/listinfo/netty-users</a><br></div></div></span>
</blockquote>
<div>
<br>
</div>