nonblocking send()/write() and pending data dealing
问题 when the send(or write) buffer is going to be full, let me say, only theres is only 500 bytes space. if I have a NONBLOCKING fd, and do n = send(fd, buf, 1000,0) here I wll get n<0, and I can get EWOULDBLOCK or EAGAIN error. my questions are: 1 here, the send write 500 bytes into the send buffer or 0 bytes to the send buffer? 2 if 500 bytes are sent to the buffer and if the fd is a UDP socket, then the datagram is split into 2 parts? 3 I need to use the fd to send many datagrams, if this time