FrameDecoder

Trustin Lee (이희승) trustin at gmail.com
Tue Sep 29 05:01:52 EDT 2009


No.  Netty does not open any additional ports that were not requested.
 Please specify how you reproduced the problem and how you counted the
number of open ports.  To me, it just works as expected:

When started server:
[trustin at vault ~]$ netstat -nat | grep :8080
tcp        0      0 :::8080                     :::*
     LISTEN

When a new connection is created from localhost:
[trustin at vault ~]$ netstat -nat | grep :8080
tcp        0      0 :::8080                     :::*
     LISTEN
tcp        0    256 ::ffff:127.0.0.1:59243      ::ffff:127.0.0.1:8080
     ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:8080       ::ffff:127.0.0.1:59243
     ESTABLISHED
[trustin at vault ~]$

— Trustin Lee, http://gleamynode.net/

On Mon, Sep 28, 2009 at 1:22 PM, sohguanh <sohguanh at yahoo.com.sg> wrote:
>
> Not wanting to flood the forum I tag along my existing topic.
>
> I tried to use the Java NIO API direct and it seems Netty in the process to
> provide convenience to developer has open up more ports for each client
> connect ?
>
> A simple Server using Java NIO API upon startup will open 2 ports which
> Netty also did. But a simple Client using Java NIO API upon connect to the
> Server will only open up another 2 more ports which I view using netstat.
> This is consistent behavoir I observe.
>
> Now for Netty, every client connect actually open up average 4-6 ports. When
> I simulate 100 client connect and then I use netstat, the number of ports
> establised is much more than using Java NIO API.
>
> May I know the "extra" ports Netty open under the hoods is for what purposes
> ? Are there any methods I can call to Netty classes to have the same
> behavoir as Java NIO API ? That is, every client connect open 2 more ports
> only.
>
> Thanks.
> --
> View this message in context: http://n2.nabble.com/FrameDecoder-tp3710280p3727477.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>



More information about the netty-users mailing list