diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-08-20 10:14:35 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@gmail.com> | 2012-09-14 08:40:33 +0100 |
commit | 45a7f54a8bb3928ffa58d522e0d61acaee8277bb (patch) | |
tree | dbda4f8a52088f7097f40a7d075eeb9a0d619075 /i386.ld | |
parent | 213fd5087e2e4e2da10ad266df0ba950cf7618bf (diff) |
net: EAGAIN handling for net/socket.c TCP
Replace spinning send_all() with a proper non-blocking send. When the
socket write buffer limit is reached, we should stop trying to send and
wait for the socket to become writable again.
Non-blocking TCP sockets can return in two different ways when the write
buffer limit is reached:
1. ret = -1 and errno = EAGAIN/EWOULDBLOCK. No data has been written.
2. ret < total_size. Short write, only part of the message was
transmitted.
Handle both cases and keep track of how many bytes have been written in
s->send_index. (This includes the 'length' header before the actual
payload buffer.)
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'i386.ld')
0 files changed, 0 insertions, 0 deletions