Loading [MathJax]/jax/output/HTML-CSS/jax.js
1 Star 2 Fork 0

libxengine/libxengine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
LGPL-3.0

中文 ||  English

XEngine

网络与媒体开发包,通信引擎与中间件,网络通信开发框架,流媒体开发框架,音视频开发框架

当前版本

V9.22.0.1001

注意

你应该先阅读README.md(English:README.en.md) .如果可以,请阅读XEngine_Docment/开发人员必读.docx
更多内容,请访问我们的网站:www.xyry.org

项目介绍

XEngine是基于C/C++开发的一套跨平台(支持Windows,Linux,Mac,Android,IOS)稳定可靠的开发框架,他提供了47个模块(SO,DLL,DYLIB)和上千个API函数供你调用,你可以在这套框架上面快速的开发部署你的应用程序环境。此引擎提供了很多关于后台服务,网络协议,流媒体,音视频编解码相关接口,你可以使用此框架快速部署与开发大型或者中小型的各种服务器以及相关的应用程序。他是关于网络协议,流媒体,音视频与服务器相关的一整套开发框架,并且他提供了整个服务生命周期的开发库.他为你解决了从网络IO层到应用层的一系列复杂的问题,包括性能问题。
此引擎你可以把他当成一个小型的C接口的BOOST库,只是他更偏向网络通信,后台服务,网络协议,流媒体协议,音视频编解码,你可以使用这套框架提供的API,开发你想要的程序或服务,包括不限于:聊天服务,视频会议,语音会议,文件服务,远程监控,日志服务,HTTP服务,代理服务,数据转发服务,消息服务,安全验证,流媒体服务,音视频编解码,P2P等等相关工具和服务的开发
XEngine拥有一整套完整的线程池模型(从网络IO到业务处理),而不是市面上的伪线程池模型,也不需要莫名其妙的协程,你可以真正实现一套高性服务器

软件目标

对于个人:学会这套开发通信引擎后,在你以后工作学习中,你会发现开发相关的应用程序非常轻松愉快.别人可能刚开始写代码,而你已经结束了你几个月的工作内容
对于企业:一个团队2-5人可能需要3-6个月完成的工作,使用此套框架,仅仅只需要1-2人花上1个月不到的时间即可完成,大大节约企业成本和时间
此开发包统一使用了C接口方式的导出,模块间函数可以独立使用,也可以全部使用.你可以根据自己需要选择使用的模块
现在,开始学习这套引擎吧...

学习计划

想要使用这套框架,完整的学习到上手可能需要一周时间.
你可以通过文档了解基础结构,通过查找头文件与全局搜索注释找到想要的功能

学习方式

如果想要做网络服务通信开发,你需要了解XEngine_Core组件的XEngine_Core模块以及XEngine_Client组件的XClient_Socket模块
你还可以查看XEngine_HelpComponents组件的HelpComponents_Packets了解如何处理网络包
更高级的使用可以结合XEngine_HelpComponents组件下的HelpComponents_XLog日志模块与HelpComponents_Database数据库模块使用
当你熟悉这套框架,你可以使用XEngine_StreamMedia组件开发流媒体或者XEngine_AVCodec开发音视频编解码功能
你还可以使用XEngine_RfcComponents组件开发一些常用的协议服务,比如HTTP,WEBSOCKET,SIP等等...

学习教程

你也可以去观看我们提供的视频教程进一步了解每个组件模块的使用方法:https://www.xyry.org/Learn.docx

部署环境

我们建议你使用git工具下载和更新(windows可以使用TortoiseGit),仅限英文路径
注意:更多可用系统版本将只在github发布.建议使用github
git clone https://gitee.com/libxengine/libxengine.git
git clone https://github.com/libxengine/libxengine.git

Windows

通过GIT下载完毕后,你可以直接运行主目录下的XEngine_WINEnv64.bat文件,安装脚本默认只配置开发环境的头文件变量,如果使用参数1,那么将拷贝所有模块到系统中
注意:git版本默认64bit的,如果需要32BIT或者ARM64那么需要在github发布页下载后放到其他目录运行XEngine_WINEnv32或者XEngine_WINEnvArm64脚本文件
执行成功后会在你的系统中添加此目录的用户环境变量
以Visual Studio为例,右键你的项目->属性->VC++目录
包含目录添加(XEngineInclude)x86(XEngine_Lib32)库目录环境
x64添加(XEngineLib64)ARM64(XEngine_LibArm64)库目录环境

如何使用

WINDOWS下使用我们的库的时候,你需要在你应用程序初始化的时候手动启用WSAStartup(MAKEWORD(2,2),&st_WSAData); 应用程序销毁的时候启用WSAClean() 这个函数才能使用我们的网络库
连接到库,比如基础库:#pragma comment(lib,"XEngine_BaseLib/XEngine_BaseLib")

运行时库

我们发布的软件都使用的是MD编译.需要VS2022的运行时库
大多数时候系统中已经安装运行库了,如果没有,那么我们建议你安装。
x86(VS2015-VS2022):https://aka.ms/vs/17/release/vc_redist.x86.exe
X64(VS2015-VS2022):https://aka.ms/vs/17/release/vc_redist.x64.exe
ARM64(VS2022):https://aka.ms/vs/17/release/vc_redist.arm64.exe

更新引擎

直接使用git拉取,git pull 即可.

Linux

我们提供了环境运行安装脚本,安装脚本是基于Ubuntu24.04位编写。我们的软件支持大多数Linux发型版本系统,如果你不是使用的这些系统,那么可能需要定制。你可以通过安装脚本 -h 参数查看安装方法.注意:Linux发型版本系统核心是分开的,无法同时兼容
linux提供了ARM64和X64的系统环境,git仓库是UBuntu24.04_x86_64的.arm64的需要自己去发布页面下载,然后运行安装脚本即可.

如何使用

打开终端
cd libxengine
chmod 777 *
sudo ./XEngine_LINEnv.sh -i 3
此脚本可以单独运行
我们推荐你执行两次环境配置脚本用于检查环境安装是否成功
连接到库,比如基础库:-lXEngine_BaseLib

更新引擎

终端使用git更新:git pull
成功后执行命令:sudo ./XEngine_LINEnv.sh -b -i 6 清理,sudo ./XEngine_LINEnv.sh -b -i 3  安装
如果有大更新,建议清理后执行 sudo ./XEngine_LINEnv.sh -i 3重新处理环境

MacOS

MacOS需要13以及以上的系统,安装方式同LINUX,你可以通过安装脚本 -h 参数查看安装方法
在执行此脚本前,请确保你电脑安装了xcode,如果没有,请在终端执行:xcode-select --install
配置brew环境的时候需要你手动输入密码和回车确认信息
我们推荐你执行两次环境配置脚本用于检查环境安装是否成功
macos提供了ARM64和X64的系统环境,git仓库是x86_64的.arm64的需要自己去发布页面下载,然后运行安装脚本即可.

如何使用

安装不需要管理员权限,直接运行:./XEngine_LINEnv.sh -i 3 即可
更新也可以通过git更新,然后-i 6清理,-i 3安装
此脚本可以单独运行

Android

只能通过拷贝SO自己配置环境,拷贝依赖的模块到你的程序中,ANDROID环境需要再GITHUB发布页下载
支持ANDROID10以及以上系统,ARM64位

IOS(IPHONE)

由于系统限制,你只能拷贝依赖的共享库到你的程序目录下放到一起,IOS环境需要再GITHUB发布页下载.
支持IOS15以及以上系统,需要ARM64位的架构

使用说明

加载头文件:
#include <pch.h> //预编译,WINDOWS可能需要
#include <系统头文件.h>
using namespace 名词空间;          //C++名词空间
#include <XEngine_CommHdr.h>
#include <XEngine_ProtocolHdr.h> //可能需要
#include <XEngine_Include/组件目录/模块名称_Define.h>
#include <XEngine_Include/组件目录/模块名称_Error.h>
#include <你的头文件>

目录结构

*libxengine            SDK发布文件夹

  • XEngine_Mac              MacOS系统模块发布文件夹(x86_64)
  • XEngine_Windows          WINDOWS发布版本文件夹,包括lib.dll等(x86_64)
  • XEngine_Linux            LINUX系统模块发布文件夹(UBuntu24.04_x86_64)
  • XEngine_Include         头文件目录
  • --XEngine_CommHdr.h      公用头文件
  • --XEngine_ProtocolHdr.h  协议头文件
  • --XEngine_Types.h        非WINDOWS系统平台的函数转换头文件
  • --XEngine_*              组件头文件目录
  • XEngine_Docment         文档目录
  • --SDK服务协议.docx        协议文档
  • --开发人员必读.docx       系统说明文档
  • --开发文档.docx           开发组必读,开发规范
  • --结构图
  • XEngine_Configure        配置文件所在文件夹,用于HTTP,SIP等的配置
  • CODE_OF_CONDUCT.md 贡献内容说明
  • CONTRIBUTING.md          贡献名单
  • README.en.md             英文必读说明
  • README.md                中文必读
  • SECURITY.md 版本维护安全更新说明
  • XEngine_LINEnv.sh        Linux和MacOS的XEngine安装配置脚本
  • XEngine_WINEnv32.bat Windows环境32位XEngine安装配置脚本
  • XEngine_WINEnv64.bat     Windows环境64位XEngine安装配置脚本
  • XEngine_WINEnvArm64.bat  Windows环境Arm64位XEngine安装配置脚本
  • XEngine_APIDoc.chm       API文档
  • CHANGELOG                最新版本更新说明
  • COPYRIGHT                第三方版权说明
  • HOSTORY                  以往更新历史
  • LICENSE                  XEngine版权说明

关注我们

如果你觉得这个软件对你有帮助,请你给我们一个START吧
也可以通过微信关注我们
qrcode

组件结构

  • 编解码组件:用于音频和视频编解码开发和过滤器,转码等操作
  • 基础组件:包含基本的时间,字符串,字符集,算法,事件,句柄,时间,安全函数等操作
  • 客户端组件:包含常规TCP和UDP客户端开发,以及其他高级客户端开发SDK
  • 核心组件:包括各种高性能网络服务,高性能线程池和网络相关基础协议开发等
  • 帮助组件:包括协议组包拆包,二进制组包拆包,解压缩,数据库相关SDK开发
  • 网络组件:与网络相关的协议与工具开发SDK
  • 标准组件:用于RFC标准组织推出的协议所开发的模块.
  • 流媒体组件:用于流媒体协议客户端服务器协议相关开发的接口模块
  • 系统组件:用于系统平台相关的SDK开发组件

参与贡献

代码库目录:https://github.com/libxengine/xengine
代码授权信息:https://www.xyry.org/auth.html
参与贡献的代码请自己fork后在自己的仓库编写代码,编写完成后可以提交PR到我们仓库的develop分支
你需要严格按照编码格式<开发文档.docx>来编写代码,参考<环境配置.docx>来配置开发环境
如果你只需要使用代码自己编译,那么请在我们仓库切换到master分支使用,develop是开发分支.不提供日常使用

软件架构

软件架构图 引擎模块图

组件结构图

音视频编解码组件结构图 基础组件结构图 客户端组件结构图 核心组件结构图 帮助组件结构图 网络组件结构图 标准组件结构图 流媒体组件结构图 系统组件结构图

GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.

简介

XEngine-后台服务与网络协议,流媒体,音视频开发框架 展开 收起
README
LGPL-3.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/libxengine/libxengine.git
git@gitee.com:libxengine/libxengine.git
libxengine
libxengine
libxengine
master

搜索帮助