Send a data string to the socket.
For the optional flags argument, see the Unix manual.
Return the number of bytes sent; this may be less than len(data) if
the network is busy.
3.5: If the system call is interrupted and the signal handler does not raise an exception, the method now retries the system call instead of raising an InterruptedError exception (see PEP 475 for the rationale).