1
0
mirror of https://github.com/fumiama/simple-kanban.git synced 2026-06-05 08:20:29 +08:00

修复 粘连检测 sendfile尾指针未定义

This commit is contained in:
fumiama
2021-05-05 22:25:57 +08:00
parent c6b1981c9c
commit 6a76606632
2 changed files with 20 additions and 11 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