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);
 
 

相关文章:

  • 2022-12-23
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2022-02-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案