Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

⛳ An easy-to-use crossplatform C++ Library, primarily for server-side development.

License

Notifications You must be signed in to change notification settings

InteractivePlus/EasyCrossPlatform_src

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyCrossPlatform(Deprecated)

EasyCrossPlatform is DEPRECATED, I don't really have time to maintain this project. This started out as a base library for InteractivePlus to develop on, but we don't think we'll write C++ servers in the near future. Plus, there are thousands of better libraries out there for you to use. Please do not consider using this library anymore.

Write Easy Code with uncompromising performances.
This project is currently in re-construction, please go to Release page to see the latest release
A project under BlueAirTechGroup, started from 15 Oct 2017
Version: 2.0 Dev
Language: 中文
You can find stable release under release page

Introduction

A easy-to-use cross-platform C++ library designed for PHP and Python Users.
Supported System: LINUX / WIN / MacOS
Supported Architecture: x86(i386) / x64(x86_64) / ARMv5 / ARMv6 / ARMv7 / ARMv8
We did not test on Big Endian Machines, please be noticed that Socket might not work according to expectation when communicating between an Big-Endian and Small-Endian Machines
Luckily, our modern CPUs are almost ALL Small-Endian
Powered by BlueAirTechGroup
Contribution List: Windy


  • Libs:
    • MultiThreadPool
    • MultiThread
    • FileIO
    • FileInfo
    • TLS & DTLS & TCP & UDP Sockets
    • MySQL / MariaDB (Using MariaDB C Connector)
    • Encryption(AES,RSA,Base64,Md5,SHA1/SHA256)
    • Compression(Deflate-Gzip, Deflate-Zlib, Brotli)
    • HTTP(s)_Requests
    • JSON
    • HTTP1.X Parser
    • International Charsets
    • Regex Expression Match/Search/Replace
    • HTTP Server(With Websocket Server Support)
  • Required Environment:
    • POSIX/Windows System
    • C++ 11

Uncompromising Performances?

Right, we use LibUV as our basis for our socket class.
As benchmark showed, on release version, the socket Delay is 240ms with 10k connections.

Credit

The development of EasyCrossPlatform is given power by the following lib:
LibUV - CrossPlatform Socket Completely built based on it, and I made an wrapper to make programming with LibUV easier.
Crypto++ - Encryption Lib, EasyCrossPlatform Encryption built based on it.
Crypto++ Examples - Crypto++ AES Example, EasyCrossPlatform AES Encryption built based on it.
MariaDB - MySQL / MariaDB Connector Lib.
JSONCPP - A quicker version of JSONCPP, a JSON parser, EasyCrossPlatform JSON class completely built based on it.
mbedtls - A encryption and TLS/SSL lib for building TLS-connected sockets.
whereami - A two-files lib which tells the program where it is.
brotli - Google Brotli Compression Lib
iconv - Iconv Internationl Charset Lib.
iconv-win - Iconv made to build with VC++. I add some header files so that it supports cross-platform compilation
WebSocket - WebSocket codes in C++. Implements RFC6455. Robust one-class parser implementation. I add some code to fix several bugs in the class
Those projects remain in their own licenses, please refer to their project site.

Why not GUI?

GUI requires too much dependencies, and we are considering using "mygui". However, the OpenGL environment in each machine can be different, and if you want to use a GUI Lib, we recommend MyGUI with OpenGL2.0 Implemention

Develop Theory

"To build with less dependency, to code with less line"
Everybody Loves C++, but there is actually no user-friendly libs for beginners to start using C++ with full support of network and multithreading function, while covering the hardware and underlying technologies.
Influenced by Reasoning Library, however, that library is no longer maintained since 2008
With less code, developers can develop more safe code preventing memory leaks and debug less. EasyCrossPlatform also brings noticeable performance while enabling developers to develop codes fast and secure.

Special Thanks

Ruki - The author of xmake, he helped me to fix building structures.

Build

This project is not even released with beta and it is still in its early stage of development.
If you cannot wait to see it,

  1. You need to install XMake, the build tool that we use to simplify our building process.
  2. Enter the /extlibs/mariadb directory and put the correct Files in the /lib directory
    • e.g.
    • Copy extlibs/mariadb/Win_x86/mariadbclient.lib to extlibs/mariadbclient.lib
    • Copy extlibs/mariadb/Win_x86/mariadb.lib to extlibs/mariadb.lib
    • Copy extlibs/mariadb/Win_x86/mariadb.dll to extlibs/mariadb.dll
  3. If you are
    1. Either of the following Linux system's user, you need to run either of following command(depends on your system), Generic Linux users are not required to run any of the following command.
xmake f -p solaris
xmake f -p zos
xmake f -p freebsd
xmake f -p dragonflybsd
xmake f -p openbsd
xmake f -p netbsd
  1. simply run xmake in the directory to generate a static/shared library that you can use.
    Remeber that the lib file generated is not cross-platform betweeen Win and Linux, and between different versions of Linux.
    You need to generate lib file each time when you are switching platforms.

Contribute

You can fork this project and request a Pull Request.
You can also help improve this project by testing.
Remember that you need to test your API first before you submit the request. Thank you!