'Returns false if we should stop writing for now'

def _handleWrite(self, rc, numBytesWritten, evt):

    if (self.disconnected or self._writeDisconnected):
        return False
    if rc:
        self.connectionLost(failure.Failure(error.ConnectionLost(('write    error    --    %s    (%s)' % (errno.errorcode.get(rc, 'unknown'), rc)))))
        return False
    else:
        self.offset += numBytesWritten
        if ((self.offset == len(self.dataBuffer)) and (not self._tempDataLen)):
            self.dataBuffer = ''
            self.offset = 0
            self.stopWriting()
            if ((self.producer is not None) and ((not self.streamingProducer) or self.producerPaused)):
                self.producerPaused = True
                self.producer.resumeProducing()
            elif self.disconnecting:
                self.connectionLost(failure.Failure(main.CONNECTION_DONE))
            elif self._writeDisconnecting:
                self._writeDisconnected = True
                self._closeWriteConnection()
            return False
        else:
            return True
