C++ http 流媒体等 开源项目记录
来源:互联网 发布:四川厚名网络 编辑:程序博客网 时间:2024/06/05 03:51
1、 http client
libcurl (C语言写的)、QT 的QNetworkAccessManager、CPP REST SDK是微软开源的基于PPL的异步http client
2、流媒体服务器
SRS(simple rtmp server) 地址 https://github.com/winlinvip/srs
EasyDarwin、Live555
3、RPC框架
阿里的Dubbo 地址 https://github.com/alibaba/dubbo
百度的sofa-pbrpc 地址:https://github.com/baidu/sofa-pbrpc
4、sqlite 客户端
smartdb 地址 https://github.com/chxuan/smartdb
easysqlite
5、http server
https://github.com/Corvusoft/restbed
Restbed 框架为 C++11 构建的程序带来了 restful 功能,它基于 boost.asio 创建。
Restbed 可用于需要通过 HTTP 无缝和安全通信构建应用程序的全面和一致的编程模型,能够对一系列业务流程进行建模,旨在针对移动,平板电脑,桌面和嵌入式生产环境。
它类似于将 NGINX 嵌入到您公司自己的产品线中。
git clone --recursive https://github.com/corvusoft/restbed.git
mkdir restbed/build
cd restbed/build
cmake -DBUILD_TESTS=YES -DBUILD_EXAMPLES=YES -DBUILD_SSL=NO] [-DBUILD_SHARED=YES -DCMAKE_INSTALL_PREFIX=/output-directory ..
make -j 2 install //CPU_CORES+1 cpu核数加一
编译完后 会在/output-directory 生成 所有文件
编译他给的例子
Example demo.cpp
#include <cstdlib>#include <restbed> #include <memory>using namespace std;using namespace restbed;void post_method_handler( const shared_ptr< Session > session ){ const auto request = session->get_request( ); int content_length = request->get_header( "Content-Length", 0 ); session->fetch( content_length, [ ]( const shared_ptr< Session > session, const Bytes & body ) { fprintf( stdout, "%.*s\n", ( int ) body.size( ), body.data( ) ); session->close( OK, "Hello, World!", { { "Content-Length", "13" } } ); } );}int main( const int, const char** ){ auto resource = make_shared< Resource >( ); resource->set_path( "/resource" ); resource->set_method_handler( "POST", post_method_handler ); auto settings = make_shared< Settings >( ); settings->set_port( 1984 ); settings->set_default_header( "Connection", "close" ); Service service; service.publish( resource ); service.start( settings ); return EXIT_SUCCESS;}
g++ -std=c++11 demo.cpp -o demo -lrestbed -I/output-directory/include -L/output-directory/library
测试
curl -d "param1=value1¶m2=value2" "http://192.168.6.185:1984/resource"
curl -d 表示 post 请求
6、http server windows端 https://github.com/ellzey/libevhtp/
7、 http server ehttp
https://github.com/hongliuliao/ehttp
安卓直播客户端 ,来疯
https://github.com/LaiFeng-Android/SopCastComponent
介绍:http://www.jianshu.com/p/7ebbcc0c5df7
- C++ http 流媒体等 开源项目记录
- 流媒体开源项目
- 流媒体服务器 开源项目
- P2P流媒体开源项目介绍
- P2P流媒体开源项目介绍
- P2P流媒体开源项目介绍
- P2P流媒体开源项目介绍
- php开源项目 http://www.phpky.cn/ [记录]
- 最强的p2p流媒体开源项目合集
- 几种P2P流媒体开源项目介绍
- 6个P2P流媒体开源项目介绍
- 几种P2P流媒体开源项目介绍
- 一些资源的记录(好的开源项目,好的博客等)
- 开源项目记录
- 开源项目记录
- 开源项目记录
- 10款C/C++ 流媒体服务器开源软件
- 10款C/C++ 流媒体服务器开源软件
- 最近找java实习面试被问到的东西总结(Java方向)
- raw h264怎么判断是否有丢包?
- Unity3D之编辑器脚本获取资源内存和硬盘大小
- H5图片展示
- 基本元器件之贴片电阻封装尺寸功率表
- C++ http 流媒体等 开源项目记录
- KMP算法
- iOS修改图片尺寸和裁剪功能以及 图片上加图片 图片加文字(水印效果)
- Android植入微信支付的那些坑
- 求链接二维空间中的点 最短的距离 (hdu 1162) kru
- KMP学习笔记
- 北京政府占股扶持机构
- 51nod 贪心入门之二 活动安排问题
- 【数组】Leetcode编程题解:485. Max Consecutive Ones Add to List