Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] NIO inefficiency?

Hi,

On Fri, Aug 9, 2013 at 3:13 PM, Viktor Szathmary <phraktle@xxxxxxxxx> wrote:
> Wouldn't the following in HttpOutput.close do a write w/ empty buffer
> explicitly?
>
> if (BufferUtil.hasContent(_aggregate))
>     _channel.write(_aggregate, !_channel.getResponse().isIncluding());
> else
>     _channel.write(BufferUtil.EMPTY_BUFFER,
> !_channel.getResponse().isIncluding());

No. Member "_channel" is Jetty's HttpChannel, not a SocketChannel.
If you follow all the way through, you'll see we skip SocketChannel
writes for empty buffers.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.


Back to the top