Quote:On a UDP socket a packet could be dropped theoretically between the call to select and the receive function.
No, it could not. The packet has left the network, and is in the realm of the kernel. The guarantees of select() and recv() say that the packet cannot be dropped at that point.
Quote:But...
send on a socket in blocking mode blocks until the *whole* buffer has been consumed. At least on Windows. It might be different on other operating systems.
No, it does not, if select() says that the socket is writable, then a send() on that socket will not block. If that means that only half the buffer is consumed (on a TCP stream), then only half the buffer is consumed (and the amount consumed is returned).