?? str_cli09.c
字號:
#include "unp.h"#include "sum.h"voidstr_cli(FILE *fp, int sockfd){ char sendline[MAXLINE]; struct args args; struct result result; while (Fgets(sendline, MAXLINE, fp) != NULL) { if (sscanf(sendline, "%ld%ld", &args.arg1, &args.arg2) != 2) { printf("invalid input: %s", sendline); continue; } Writen(sockfd, &args, sizeof(args)); if (Readn(sockfd, &result, sizeof(result)) == 0) err_quit("str_cli: server terminated prematurely"); printf("%ld\n", result.sum); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -