We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssize_t HttpConn::write(int* saveErrno) { ssize_t len = -1; do { len = writev(fd_, iov_, iovCnt_); if(len <= 0) { saveErrno = errno; break; } if(iov_[0].iov_len + iov_[1].iov_len == 0) { break; } / 传输结束 / else if(static_cast<size_t>(len) > iov_[0].iov_len) { iov_[1].iov_base = (uint8_t) iov_[1].iov_base + (len - iov_[0].iov_len); iov_[1].iov_len -= (len - iov_[0].iov_len); if(iov_[0].iov_len) { writeBuff_.RetrieveAll(); iov_[0].iov_len = 0; } } else { iov_[0].iov_base = (uint8_t*)iov_[0].iov_base + len; iov_[0].iov_len -= len; writeBuff_.Retrieve(len); } } while(isET || ToWriteBytes() > 10240); return len; `}```
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ssize_t HttpConn::write(int* saveErrno) {
ssize_t len = -1;
do {
len = writev(fd_, iov_, iovCnt_);
if(len <= 0) {
saveErrno = errno;
break;
}
if(iov_[0].iov_len + iov_[1].iov_len == 0) { break; } / 传输结束 /
else if(static_cast<size_t>(len) > iov_[0].iov_len) {
iov_[1].iov_base = (uint8_t) iov_[1].iov_base + (len - iov_[0].iov_len);
iov_[1].iov_len -= (len - iov_[0].iov_len);
if(iov_[0].iov_len) {
writeBuff_.RetrieveAll();
iov_[0].iov_len = 0;
}
}
else {
iov_[0].iov_base = (uint8_t*)iov_[0].iov_base + len;
iov_[0].iov_len -= len;
writeBuff_.Retrieve(len);
}
} while(isET || ToWriteBytes() > 10240);
return len;
`}```
The text was updated successfully, but these errors were encountered: