1
0
mirror of https://github.com/fumiama/simple-dict.git synced 2026-06-08 20:10:24 +08:00

修复sendfile尾指针为定义

This commit is contained in:
fumiama
2021-05-05 22:25:10 +08:00
parent baa98235b2
commit bd76044e9e
2 changed files with 5 additions and 1 deletions

View File

@@ -80,6 +80,8 @@ int main(int argc,char *argv[]) { //usage: ./client host port
headers.iov_len = sizeof(uint32_t);
hdtr.headers = &headers;
hdtr.hdr_cnt = 1;
hdtr.trailers = NULL;
hdtr.trl_cnt = 0;
if(!sendfile(fileno(fp), sockfd, 0, &len, &hdtr, 0)) puts("Send file success.");
else puts("Send file error.");
#else