上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页
摘要: 栈帧的概念: 每个线程都有自己的栈空间,对应线程的每一个执行的函数,都有一个相对应的栈帧,栈帧存有该函数的入参、出参、局部变量以及返回地址,一个完整的栈信息就是由N个栈帧组成的,栈空间的开辟是由高地址向低地址的。 写一个简单的函数调用 #include <cstdio> #include <stri 阅读全文
posted @ 2022-06-11 12:27 ho966 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 1、设置tcp保活时间,600单位是s net.ipv4.tcp_keepalive_time=600 2、自动分配端口范围为37268~65535 net.ipv4.ip_local_port_range=37268 65535 3、设置tcp连接等待队列长度 net.ipv4.tcp_max_s 阅读全文
posted @ 2022-06-07 23:12 ho966 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 1、netstat -anl |grep 端口号 2、ss -anl |grep 端口号 3、lsof -i:端口号 阅读全文
posted @ 2022-06-07 23:05 ho966 阅读(151) 评论(0) 推荐(0) 编辑
摘要: /etc/systctl.conf 添加 net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 阅读全文
posted @ 2022-06-07 23:01 ho966 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 系统配置文件 /etc/sysctl.conf 添加配置 net.ipv4.icmp_echo_ignore_all=1 重新生效 sysctl -p 阅读全文
posted @ 2022-06-07 22:58 ho966 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 1、查看所有网卡 ip a 2、查看单个网卡信息 ethtool 网卡名 3、网卡配置文件 路径 /etc/sysconfig/network-scripts/ifcfg-ens33 4、修改配置文件后重启network生效 systemctl restart network 5、查询网卡速率 sa 阅读全文
posted @ 2022-06-07 21:47 ho966 阅读(537) 评论(0) 推荐(0) 编辑
摘要: EAGAIN或EWOULDBLOCK二者应该是一样的,对应的错误码是11, socket在对端关闭后,recv返回的长度为0 socket非阻塞模式下, 如果缓存区没数据,此时recv就会 返回-1,报错误码EAGAIN或EWOULDBLOCK,所以读取失败,要判断是errno是否为EAGAIN或E 阅读全文
posted @ 2022-06-01 17:32 ho966 阅读(453) 评论(0) 推荐(0) 编辑
摘要: consumer.cpp #include "AMQPcpp.h" #include <thread> #include <string> #include <iostream> #include <chrono> int onCancel(AMQPMessage * message) { std: 阅读全文
posted @ 2022-05-15 22:26 ho966 阅读(62) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/weixin_45070175/article/details/118660954 阅读全文
posted @ 2022-05-15 22:15 ho966 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 写一个死锁代码: #include <mutex> #include <thread> #include <chrono> std::mutex s_mtx_1; std::mutex s_mtx_2; int main() { std::thread thread1([&](){ s_mtx_1. 阅读全文
posted @ 2022-04-20 07:37 ho966 阅读(251) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页