摘要: Server #include <stdio.h> #include <Ws2tcpip.h> #include <winsock2.h> #pragma comment(lib,"ws2_32.lib") ​ #define PORT 6060 #define IP "ff02::2" #defi 阅读全文
posted @ 2020-12-24 22:21 mahuifa 阅读(612) 评论(0) 推荐(0) 编辑
摘要: Server #include <stdio.h> #include <Ws2tcpip.h> #include <winsock2.h> #define HELLO_PORT 7905 #define HELLO_GROUP "224.0.0.1" #pragma comment(lib,"ws2 阅读全文
posted @ 2020-12-24 22:19 mahuifa 阅读(562) 评论(0) 推荐(0) 编辑
摘要: Cilect #include <stdio.h> #include <Ws2tcpip.h> #include <winsock2.h> #define HELLO_PORT 7905 #define HELLO_GROUP "224.0.0.1" #pragma comment(lib,"ws2 阅读全文
posted @ 2020-12-24 22:16 mahuifa 阅读(265) 评论(0) 推荐(0) 编辑
摘要: Server #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <arpa/inet.h> int main() { //创建套接字 int fd = socket(AF_I 阅读全文
posted @ 2020-12-24 22:14 mahuifa 阅读(770) 评论(0) 推荐(0) 编辑