摘要: #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <pthread.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #inc 阅读全文
posted @ 2022-04-16 18:59 starc的miao 阅读(44) 评论(0) 推荐(0)
摘要: 待更新 阅读全文
posted @ 2022-04-15 21:51 starc的miao 阅读(13) 评论(0) 推荐(0)
摘要: 并发和异步机制,导致线程之间资源竞争的无序性。 由此,引入同步机制,消除复杂性,实现线程之间的数据共享。 异步的定义是什么? 未搞懂 线程同步 思想:同步各个线程对资源的访问,比如:全局变量、文件。 解决方法:锁,获得锁的线程才能完成读写操作,一个原子操作。 原子操作是未了防止CPU执行计算过程中, 阅读全文
posted @ 2022-04-15 20:03 starc的miao 阅读(70) 评论(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 阅读(192) 评论(0) 推荐(0)
摘要: 参考链接 深入浅出的讲解傅里叶变换(真正的通俗易懂) https://blog.csdn.net/l494926429/article/details/51818012 复数的物理意义是什么? https://www.zhihu.com/question/23234701/answer/260170 阅读全文
posted @ 2022-04-13 14:31 starc的miao 阅读(235) 评论(0) 推荐(0)
摘要: 原由 https://www.bilibili.com/video/BV1o54y1X7nk?from=search&seid=12985726183852061713&spm_id_from=333.337.0.0 看到这个小视频是通过转发linux桌面到windows实现的图片展示,所以想试一下 阅读全文
posted @ 2022-04-07 16:29 starc的miao 阅读(175) 评论(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 阅读(83) 评论(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 阅读(93) 评论(0) 推荐(0)
摘要: 变成可执行程序 1.对脚本添加可执行权限 chmod +x ***.sh 2.添加到系统环境变量 #!/bin/bash #echo $PATH for ((i=0; i<10; i++)) do echo "Running"; sleep 1 done 环境变量 set查看当前环境变量 \$5-- 阅读全文
posted @ 2022-04-04 00:11 starc的miao 阅读(29) 评论(0) 推荐(0)
摘要: 概述 各种协议说明 层结构 TCP/UDP TCP:可靠连接 UDP:不可靠连接 端口 socket端口 socket接口 阅读全文
posted @ 2022-04-03 12:08 starc的miao 阅读(35) 评论(0) 推荐(0)