The use case is, in an only reading server, when a shutdown request is received to prevent clients to send more data but do the best effort to process possible data in buffers.

I've tried with shutdownInput() and socket.close(), which successfully prevent further reading but also buffered content.

shutdownInput() was my first bet, but documentation clearly says that further read() will return -1, althought I've seen some code in Apache NIFI that seems to read data after shutdown.

0

There are 0 best solutions below