![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
服务器
文章平均质量分 50
wangzai6378
喜欢游戏;但却没有做游戏
展开
-
linux使用shell采集内存、与cpu使用率
性能采集原创 2022-09-02 09:03:49 · 1248 阅读 · 0 评论 -
常用linux脚本命令
常用shell脚本命令字符串替换列表List新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入字符串替换sed 's/原字符/新字符/g 后面g表示全替换。 sed -i 's/xx/aaa/g' filename 替换原创 2021-01-28 10:08:06 · 346 阅读 · 0 评论 -
ubuntu18.04 升级docker版本到19.03
# 关闭dockersudo systemctl stop docker# 卸载旧版本:sudo apt-get purge docker-ce# 安装新版本sudo apt updatesudo apt-get -y install apt-transport-https ca-certificates curl software-properties-commoncurl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg.原创 2020-05-17 13:00:48 · 3963 阅读 · 0 评论 -
boost asio简易tcp服务器
可用于一些需要tcp连接的场景,代码简洁,不易出错,经测试可用#include <iostream>#include <memory>#include <array>#include <boost/asio.hpp>class session : public std::enable_shared_from_this<sess...原创 2019-10-18 18:07:43 · 935 阅读 · 0 评论 -
c/c++ fast_dfs上传、下载图片
首先安装libfastcommon1、git clone https://github.com/happyfish100/libfastcommon.git安装fastdfs2、cd libfastcommon && ./make.sh && ./make.sh install3、git clone https://github.com/happyf...原创 2019-06-30 14:15:43 · 1991 阅读 · 0 评论 -
c++ 读写mongodb
mongocxx::pool *pool_ = new mongocxx::pool(mongocxx::uri(mongodb://192.168.2.11:27017/?minPoolSize=3)); try{ std::vector<uchar> data_encode; cv::imencode(".jpg",data.snapsh...原创 2019-07-03 15:27:53 · 1642 阅读 · 0 评论 -
Poco访问mysql
伪代码如下1、建立连接池 Poco::Data::MySQL::Connector::registerConnector(); sessionpool_ = new Poco::Data::SessionPool("MySql", "host=192.168.2.143;port=23306;db=test;user=root;password=123;com...原创 2019-07-03 15:19:35 · 1233 阅读 · 0 评论 -
c++使用poco上传form表单(可从磁盘和内存中加载文件),解析form表单
1、上传比较简单,已经有封装好的类Poco::Net::StringPartSource可以使用;该类可以添加一般的text字段,也可以添加文件字段。如下#include <iostream>#include <fstream>#include <sstream>#include <memory>#include "Poco/Net...原创 2019-07-02 15:43:05 · 2913 阅读 · 5 评论 -
使用epoll实现读写和推送服务器(二)
这篇主要介绍上篇的epollloop中使用到的EpollServer、EpollStream的实现。 Server的话一般会有绑定、连接的步骤; Stream的话只是对套接字的一种封装叫法,其实就是半读写封装到一起了。Server每接受一个新的连接都会返回一个套接字,另外服务器、客户端都是一个套接字,所以这里也有套接的封装,也就是一个Stream了,所以对于Server和...原创 2018-07-31 22:50:04 · 766 阅读 · 0 评论 -
使用empoll实现读写和推送服务器(一)
linux下的服务大多都是epoll,网上有很多都是Requset-Response类型的服务器; 自己项目中有推送的需要,所以自己也做了个,另外我阅读了epoll写操作事件触发机制感觉写得很全,自己也测试过,写了个server,与大家分享。 为了好濱示推送,我把它与Qt项目结合了,Qt只是为了产生推送的消息,其它全为纯c++代码。epoll的监听是一个死循环,我定义了如...原创 2018-07-27 21:49:24 · 688 阅读 · 0 评论