3 Star 19 Fork 7

xyry / libXEngine

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

中文 ||  English  

XEngine

网络开发包,网络通信引擎,网络通信中间件,网络通信开发框架

当前版本

V8.27.0.1001

注意

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

项目介绍

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

软件目标

学会这套开发通信引擎后,在你以后工作学习中,你会发现开发网络通信相关的应用程序非常轻松愉快.它几乎包含了所有网络通信相关的API函数封装.
此开发包统一使用了C接口方式的导出,模块间函数可以独立使用,也可以全部使用.你可以根据自己需要选择使用的模块.
你甚至可以用我们这套SDK不调用任何系统API就可以开发一套大型的服务器
现在,开始学习这套引擎吧...

学习计划

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

学习方式

如果想要做网络服务通信开发,你需要了解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),仅限英文路径
git clone https://gitee.com/xyry/libxengine.git
git clone https://github.com/libxengine/xengine.git

Windows

下载完毕后,你可以直接运行主目录下的XEngine_WINEnv.bat文件
执行成功后会在你的系统中添加此目录的用户环境变量
以Visual Studio为例,在你的项目->属性->VC++目录->包含目录添加$(XEngine_Include)头文件环境
x86添加 $(XEngine_Lib32) 库目录环境
x64添加 $(XEngine_Lib64) 库目录环境

如何使用

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

更新引擎

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

Linux

只支持BIT64位系统。我们提供了环境运行安装脚本,如果在你的系统中运行,安装脚本是基于RockyLinux 9_x64和Ubuntu22.04_x64 位编写。我们的软件支持RedHat,Centos,RockyLinux,Ubuntu和Debian,如果你不是使用的这些系统,那么你需要自己查看我们的依赖库并且安装,只要是64位即可。你可以通过安装脚本 -h 参数查看安装方法.注意:UBUNTU(DEBIAN)和Rocklinux(REDHAT)核心是分开的,无法同时兼容.

如何使用

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

更新引擎

终端使用git更新:git pull
成功后执行命令:sudo ./XEngine_LINEnv.sh -b -i 6 清理,sudo ./XEngine_LINEnv.sh -b -i 3  安装

MacOS

MacOS需要13以及以上的系统,只支持64位系统,安装方式同LINUX,你可以通过安装脚本 -h 参数查看安装方法
在执行此脚本前,请确保你电脑安装了xcode,如果没有,请在终端执行:xcode-select --install
配置brew环境的时候需要你手动输入密码和回车确认信息
我们推荐你执行两次环境配置脚本用于检查环境安装是否成功

如何使用

安装更新方式可以参考LINUX,都一样的。
MacOS链接库(dylib)可以直接放到和程序一样的目录下运行,而不是放到系统目录.具体可以根据你的使用方式决定
此脚本可以单独运行

Android

只能通过拷贝SO自己配置环境,拷贝依赖的模块到你的程序中
支持ANDROID10以及以上系统,ARM64位

IOS(IPHONE)

由于系统限制,你只能拷贝依赖的共享库到你的程序目录下放到一起.
支持IOS13以及以上系统,需要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_Android          Android发布版本文件夹,包括so等
  • XEngine_IOS              IOS发布版本文件夹
  • XEngine_Mac              MacOS系统模块发布文件夹
  • XEngine_Windows          WINDOWS发布版本文件夹,包括lib.dll等
  • --x64                    64位DLL发布文件夹
  • --XEngine_*              组件目录 包含组件拥有的dll和lib
  • --x86                    32位DLL发布文件夹
  • 同64位
  • XEngine_Linux            LINUX系统模块发布文件夹
  • --Centos                 Centos系统专用发布文件夹
  • --XEngine_*             组件模块发布目录
  • --Ubuntu                 Ubuntu系统专用发布文件夹
  • 同Centos位
  • XEngine_Include         头文件目录
  • --XEngine_CommHdr.h      公用头文件
  • --XEngine_ProtocolHdr.h  协议头文件
  • --XEngine_Types.h        非WINDOWS系统平台的函数转换头文件
  • --XEngine_*              组件头文件目录
  • XEngine_Docment         文档目录
  • --SDK服务协议.docx        协议文档
  • --开发人员必读.docx       系统说明文档
  • --开发文档.docx           开发组必读,开发规范
  • --结构图
  • XEngine_Configure        配置文件所在文件夹,用于HTTP,SIP等的配置
  • CONTRIBUTING.md          贡献名单
  • README.en.md             英文必读说明
  • README.md                中文必读
  • XEngine_LINEnv.sh        Linux和MacOS的XEngine安装配置脚本
  • XEngine_WINEnv.bat       Windows环境XEngine安装配置脚本
  • XEngine_APIDoc.chm       API文档
  • CHANGELOG                最新版本更新说明
  • COPYRIGHT                第三方版权说明
  • HOSTORY                  以往更新历史
  • LICENSE                  XEngine版权说明

关注我们

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

组件结构

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

软件架构

软件架构图 引擎模块图

组件结构图

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

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 网络通信引擎 XEngine 网络中间件 XEngine 网络通信开发框架 展开 收起
C/C++ 等 2 种语言
LGPL-3.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C/C++
1
https://gitee.com/xyry/libxengine.git
git@gitee.com:xyry/libxengine.git
xyry
libxengine
libXEngine
master

搜索帮助

14c37bed 8189591 565d56ea 8189591