sendfile support in Netty?

"이희승 (Trustin Lee)" trustin at gmail.com
Mon Jul 20 23:13:27 EDT 2009


Hi Jay,

sendfile support is not available yet in Netty.  It might be implemented
in Netty 3.2 as we are about to release feature-frozen 3.1 very soon.
Please feel free to file a JIRA issue. :)

Alternatively, you can use ChunkedWriteHandler in the
org.jboss.netty.handler.stream package although it's not leveraging
sendfile.

HTH,
Trustin

On 07/21/2009 12:31 AM, Jay Kreps wrote:
> Hi All,
> 
> NIO makes it possible to directly transfer data between os pagecache and a
> socket using the FileChannel.transferTo (and transferFrom) calls. This is a
> very big performance boost, as it makes use of the sendfile system call and
> thus avoids copying the data in and out of user space. Is there any way to
> make use of this optimization in Netty?
> 
> What I am looking for is some way to get ahold of the underlying
> SocketChannel so I can pass it to the transferTo call.
> 
> Thanks!
> 
> -Jay



More information about the netty-users mailing list