mirror of
https://github.com/fumiama/simple-dict.git
synced 2026-06-13 06:50:29 +08:00
输出格式统一
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
build
|
build
|
||||||
.vscode
|
.vscode
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
|
.DS_Store
|
||||||
2
client.c
2
client.c
@@ -90,7 +90,7 @@ int main(int argc,char *argv[]) { //usage: ./client host port
|
|||||||
else puts("Send file error.");
|
else puts("Send file error.");
|
||||||
#endif
|
#endif
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
printf("Send count:%lld\n", len);
|
printf("Send count:%u\n", len);
|
||||||
} else puts("Open file error!");
|
} else puts("Open file error!");
|
||||||
} else {
|
} else {
|
||||||
send(sockfd, buf, strlen(buf), 0);
|
send(sockfd, buf, strlen(buf), 0);
|
||||||
|
|||||||
2
server.c
2
server.c
@@ -152,7 +152,7 @@ int send_all(THREADTIMER *timer) {
|
|||||||
send_data(timer->accept_fd, timer->data, head_len);
|
send_data(timer->accept_fd, timer->data, head_len);
|
||||||
re = sendfile(timer->accept_fd, fileno(fp), &len, file_size) >= 0;
|
re = sendfile(timer->accept_fd, fileno(fp), &len, file_size) >= 0;
|
||||||
#endif
|
#endif
|
||||||
printf("Send %lld bytes.\n", len);
|
printf("Send %u bytes.\n", len);
|
||||||
close_dict();
|
close_dict();
|
||||||
timer->is_open = 0;
|
timer->is_open = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user