def _sendall(sock, data):
        length = len(data)
        while length:
            try:
                sent = sock.send(data)
            except socket.error, e:
                if e[0] == errno.EAGAIN:
                    select.select([], [sock], [])
                    continue
                else:
                    raise
            data = data[sent:]
            length -= sent
Writes data to a socket and does not return until all the data is sent.
dataset/ETHPy150Open kdart/pycopia/core/pycopia/inet/fcgi.py/Record._sendall