typedef struct {
char s[20];
int i;
float f;
} S;
S *s=(S*)malloc(sizeof(S));
Sendto(sockfd, s, sizeof(S), 0, pservaddr, servlen);
Recvfrom(sockfd, s, sizeof(S), 0, pcliaddr, &len);
printf("receive:%lf,%d,%s\n",s->f,s->i,s->s);
typedef struct {
char s[20];
int i;
float f;
} S;
S *s=(S*)malloc(sizeof(S));
Sendto(sockfd, s, sizeof(S), 0, pservaddr, servlen);
Recvfrom(sockfd, s, sizeof(S), 0, pcliaddr, &len);
printf("receive:%lf,%d,%s\n",s->f,s->i,s->s);
躲猫猫社团团长 http://t.sina.com.cn/coolria