摘要:
#include <sys/socket.h>#include <netdb.h>#include <unistd.h>#include <string.h>#include <stdlib.h>#include <stdio.h>#include <signal.h>#include <memor 阅读全文
摘要:
广播实现一对多的通信,通过向广播地址发送数据报文实现 只有udp的程序才能广播,tcp不能 #include <sys/socket.h>#include <netdb.h>#include <unistd.h>#include <string.h>#include <stdlib.h>#inclu 阅读全文
摘要:
#include <sys/socket.h>#include <netdb.h>#include <unistd.h>#include <string.h>#include <stdlib.h>#include <stdio.h>#include <signal.h>#include <memor 阅读全文
摘要:
在/etc/hosts中已经设置了ip与域名的映射关系,通过域名解析函数进行解析(主机名,别名,协议类型,网络地址大小,指向网络IP地址指针等) 部分解析函数: #include<netdb.h> struct hostent gethostbyname(const char *hostname); 阅读全文
摘要:
#include <sys/socket.h>#include <netdb.h>#include <unistd.h>#include <string.h>#include <stdlib.h>#include <stdio.h>#include <signal.h>#include <memor 阅读全文
摘要:
#include <sys/socket.h>#include <netdb.h>#include <unistd.h>#include <string.h>#include <stdlib.h>#include <stdio.h>#include <signal.h>#include <time. 阅读全文