In socket communication:
In blocking mode,
send()will return the number of byte sent, then I have to repeatsend()until all data has been sent or socket error.In non-blocking mode,
send()will return with EAGAIN/EWOULDBLOCK error if it cannot send all data immediately, then, I willselect()on writefds param until I have the signal.
My questions:
- Is the signal from
select()for all data? (not partial). - Is the error from
select()as socket failure?