2020
09-28
09-28
Linux UDP服务端和客户端程序的实现
1.源码UDP服务端:/***@briefUDP服务端*@authorMculover666*@date2020/04/15*/#include<stdio.h>#include<unistd.h>#include<sys/types.h>#include<sys/socket.h>#include<netinet/in.h>#include<arpa/inet.h>#include<stdlib.h>#include<string.h>intmain(intargc,char*argv[]){intserver_sock_fd;structsockaddr_inserver_addr,client_addr;charrecv_buf[100];intnbytes=0;socklen_t...
继续阅读 >