methodtAbstractSocket.WaitForWrite
function WaitForWrite(aMSec: Cardinal): Boolean; virtual; abstract;
Blocking poll for WRITABILITY, the counterpart of WaitForData: True once the socket can accept more outbound bytes, False on timeout, on a Wake, or when the socket is gone. It exists because a Send that fills the kernel buffer returns short (or would-block), and without this a writer has nothing to wait on and must either spin or sleep for a fixed slice - which stalls every stream multiplexed over the same connection behind one large upload. ALWAYS PASS A FINITE aMSec. A Wake raised while this call is already parked interrupts it on POSIX but not on Windows (select cannot wait on an event there); the wake is sticky, so it is consumed by the NEXT WaitForData/ WaitForWrite instead, and a finite timeout bounds the delay.