util: make do_send_recv work with partial send/recv
commit3f08376c2e1c3d3bb0b415fb1505b949d72655d4
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Thu, 6 Oct 2022 11:36:53 +0000 (6 15:36 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 12 Oct 2022 15:22:01 +0000 (12 19:22 +0400)
tree71169eaca96bc299b7cba33e18c7994b756e5b35
parentc1f798091319c74cd9a90f36af604c782e7ee7bd
util: make do_send_recv work with partial send/recv

According to msdn documentation and Linux man pages, send() should try
to send as much as possible in blocking mode, while recv() may return
earlier with a smaller available amount, we should try to continue
send/recv from there.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221006113657.2656108-3-marcandre.lureau@redhat.com>
util/iov.c