lib/tsocket: add tstream_bsd_fail_readv_first_error()
authorStefan Metzmacher <metze@samba.org>
Thu, 12 Jan 2023 09:08:56 +0000 (10:08 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 24 Oct 2023 09:36:37 +0000 (09:36 +0000)
commit71e8727bdc085673360f69f6e28afbd6a6adfae7
treeeb564fe62e80913ee8880bcf844ae8179a44c5e1
parent5bedf1675e7b5a960f34beef87da79cad5b696a6
lib/tsocket: add tstream_bsd_fail_readv_first_error()

This gives the caller the option to fail immediately if
TEVENT_FD_ERROR appear even with pending bytes in the
recv queue.

Servers typically want to activate this in order to avoid
pointless work, while clients typically want to read
pending responses from the recv queue.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/tsocket/tsocket.h
lib/tsocket/tsocket_bsd.c