自己随意写的,喜欢可以的看下: #include<stdio.h> #include<sys/socket.h> #include<netdb.h> #include<netinet/in.h> #include<arpa/inet.h> #include<string.h> #include<stdlib.h> #include <signal.h> #include <sys/types.h> #include <time.h> //ctiem()澶存枃浠? #include "c.h" #define PORT 2056 /*-----------------------------------------------------------------------*鍔熻兘锛氬彂閫佸笎鍙峰瘑鐮佽繘琛岄獙璇?鍙傛暟锛歴ockfd(鐩戝惉濂楁帴瀛?*/ void send_userinfo(int sockfd) { char id[20],buf[20],idpsd[20]; char psd[20]; int ret = 0; strcpy(buf,"l "); printf("please input ID:"); fflush(stdout); scanf("%s",id); strcat(buf,id); strcat(buf," "); printf("please input PSD:"); fflush(stdout); scanf("%s",psd); strcat(buf,psd); //strcat write(sockfd,buf,strlen(buf));
- 粉丝: 1
- 资源: 17
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助