Handle partial writes on non-blocking sockets
commit12826c9586f19b63198879c4bb93eb6395d0bfe1
authorViktor Dukhovni <viktor@twosigma.com>
Thu, 7 Nov 2019 01:27:58 +0000 (6 20:27 -0500)
committerViktor Dukhovni <viktor@twosigma.com>
Thu, 7 Nov 2019 01:27:58 +0000 (6 20:27 -0500)
treef1d27005cd6b34b0ad1afd3ff37632388506df74
parent9ca5d710f9e23364cbb53eb7dcd326fbb0bf151f
Handle partial writes on non-blocking sockets

Now that we're using krb5_net_write() with non-blocking sockets in
ipropd_master, we MUST correctly account for partial writes.

Therefore, roken net_write() called from krb5_net_write() now
returns the number of bytes written when the socket error was
EWOULDBLOCK (or EAGAIN).

Also, fix potential issue on Windows, where errno was used instead
of rk_SOCKET_ERRNO whether or not we used _write() or send().
lib/roken/net_write.c