随笔分类 -  网络编程

摘要:项目描述 TCP协议,客户端和服务端,支持多机 发送和接受文件和图片 发送字符串信息,记录到文本 编译工具,makefile,cmake,检查工具 知识点 抓包工具wireshark,分析数据包 文件IO,读取文件 界面交互式设计,获取参数 网络套接字,网络通信 多线程、多进程,多机通信 变量同步, 阅读全文
posted @ 2022-11-08 21:03 starc的miao 阅读(54) 评论(0) 推荐(0)
摘要:第一版 #include <stdio.h> #include <string.h> #include <errno.h> #include <stdlib.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> # 阅读全文
posted @ 2022-10-17 10:30 starc的miao 阅读(67) 评论(0) 推荐(0)
摘要:第一版 /* UDP socket server server:socket-->bind-->recvfrom-->sendto-->close */ #include <stdlib.h> #include <stdio.h> #include <sys/socket.h> #include < 阅读全文
posted @ 2022-10-17 10:29 starc的miao 阅读(198) 评论(0) 推荐(0)
摘要:第一版 #include <stdio.h> #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> //close() #in 阅读全文
posted @ 2022-10-13 09:27 starc的miao 阅读(253) 评论(0) 推荐(0)
摘要:第一版 #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> // 包含套接字函数库 #include <netinet/in.h> // 包含AF_INET相关结构 #include <arpa/inet.h> // 包 阅读全文
posted @ 2022-04-14 21:54 starc的miao 阅读(190) 评论(0) 推荐(0)
摘要:转换地址格式 inet_ntop() const char *inet_ntop(int family, const void *addrptr, char *strptr, size_t len) { const u_char *p = (const u_char*)addrptr; if (fa 阅读全文
posted @ 2022-04-05 20:42 starc的miao 阅读(75) 评论(0) 推荐(0)
摘要:主要流程 常用TCP函数 TCP:流式套接字 UDP:数据包套接字 套接字建立 socket() 结构体前缀sockaddr_ sockaddr_in结构体 包含的头文件#include <netinet/in.h> socket domain AF_UNIX AF_INET 32地址+16端口 A 阅读全文
posted @ 2022-04-04 02:08 starc的miao 阅读(84) 评论(0) 推荐(0)
摘要:概述 各种协议说明 层结构 TCP/UDP TCP:可靠连接 UDP:不可靠连接 端口 socket端口 socket接口 阅读全文
posted @ 2022-04-03 12:08 starc的miao 阅读(33) 评论(0) 推荐(0)