1
0
mirror of https://github.com/fumiama/simple-kanban.git synced 2026-06-12 21:00:23 +08:00

修复linux sendfile语法问题

This commit is contained in:
fumiama
2021-05-02 23:59:58 +08:00
parent 0b2c8c3d9b
commit 3ac2667c42
2 changed files with 3 additions and 3 deletions

View File

@@ -136,9 +136,9 @@ int sendAll(char* file_path, THREADTIMER *timer) {
sendfile(fileno(fp), timer->accept_fd, 0, &len, &hdtr, 0);
#else
send(timer->accept_fd, &file_size, sizeof(uint32_t), 0);
sendfile(fileno(fp), timer->accept_fd, &len, file_size);
sendfile(timer->accept_fd, fileno(fp), &len, file_size);
#endif
printf("Send %lld bytes.", len);
printf("Send %lld bytes.\n", len);
closeFile(fp);
timer->is_open = 0;
}