Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Async servlet writes

Hi,

On Mon, Jul 31, 2017 at 10:27 AM, Sachin Kale <sachinpkale@xxxxxxxxx> wrote:
Thanks Greg.

One more question: Do we need to use non-blocking writes even with non-blocking sockets? My understanding is that: with non-blocking sockets, we will write to sockets only when it is available to write. So, in that case isReady() will always return true, right?

​You don't have control on whether the socket is non-blocking or not, this is buried into the Jetty implementation.
By default Jetty uses non-blocking sockets.​

Even with non-blocking sockets, isReady() may return false if you write enough to the socket to fill the network buffers, and the other peer does not read the data that has been written.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.

Back to the top