Ah, the documentation is wrong - send_buf returns -1 or 0.