DefaultFileRegion and SslHandler
이희승 (Trustin Lee)
trustin at gmail.com
Fri Aug 26 00:28:54 EDT 2011
On Tuesday, August 23, 2011 at 3:17 PM, Norman Maurer wrote:
> Hi there,
>
> I plan to use the DefaultFileRegion to speed up transfer of my
> file-based content (maildir). In one example[1] I saw that it can not be
> used with SSL. Is this still the case ?
Yes, FileRegion is for zero-copy transfer. To encrypt something we have to load the data into user space which involves memory copy. You have to use the ChunkedWriteHandler instead.
> I'm also concerned about the limitation for NIO only, as we made it
> plugable to use NIO or OIO. So whats the best thing to make sure to only
> use it with NIO ? Check the instanceof ServerSocketChannelFactory and
> only use it if its an instance of NioServerSocketChannelFactory ?
That's a good idea.
HTH
--
Trustin Lee (http://gleamynode.net/)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/netty-users/attachments/20110826/de32baff/attachment-0001.html
More information about the netty-users
mailing list