Giter Club home page Giter Club logo

cyclone's Introduction

Cyclone

Cyclone is a lightweight network library, It is cross-platform and high-performance

  • Cross platform (Windows, Mac OS X, Linux, Android)
  • Non-blocking IO + IO multiplexing, support epoll, kqueue, select
  • One loop per thread + reactor model
  • Mostly wait-free multi-threaded design
  • Support vectored I/O and timerfd api(Linux)
  • Usefull utility support(DH key exchange, AES, adler32, and more)
  • Unit test and samples ย 

Dependencies

Cyclone depends on following libraries

Cyclone has been tested with Clang (under Mac OS X), GCC 4.8+ (under Linux), Android Build Tools 25.0 and Microsoft Visual Studio 2017(under Windows 10).

Build & Test

On Linux or Mac OS X:

git clone https://github.com/thejinchao/cyclone
mkdir _build && cd _build
cmake -G "Unix Makefiles" ../cyclone
make
make test

On Windows

  1. Open CMake-GUI, enter the correct directory for source code and build. Then click Configure, choose your installed version of the Microsoft Visual Studio.
  2. Click generate after fixing all missing variables to generate your Visual Studio solution.
  3. Open the solution and compile the code.
  4. Right click the project RUN TESTS and slect Build to run unit test

On Android

Build on the windows host machine, make sure the flowing envionment variables have been set correctly. ANDROID_SDK_ROOT, ANDROID_NDK_ROOT

git clone https://github.com/thejinchao/cyclone
mkdir _build && cd _build
%ANDROID_SDK_ROOT%/cmake/3.10.2.4988404/bin/cmake.exe -G "Ninja" -DANDROID_ABI=armeabi-v7a ^
 -DANDROID_NDK=%ANDROID_NDK_ROOT% -DCMAKE_TOOLCHAIN_FILE=%ANDROID_NDK_ROOT%/build/cmake/android.toolchain.cmake ^
 -DANDROID_NATIVE_API_LEVEL=28 -DCMAKE_MAKE_PROGRAM=%ANDROID_SDK_ROOT%/cmake/3.10.2.4988404/bin/ninja.exe ^
 ../cyclone

%ANDROID_SDK_ROOT%/cmake/3.10.2.4988404/bin/ninja.exe

To run unit test, an android device with root authority is required.

adb push test/unit/cyt_unit /data/local/tmp/
adb shell chmod +x /data/local/tmp/cyt_unit
adb shell /data/local/tmp/cyt_unit

Samples

  • echo a typical client/server program
  • timer just show how to use timer function
  • chat a simple chat room program
  • socks5 a Socks5 proxy server(only support tcp protocol)
  • relay a interesting socket tunnel utility, support n:1, 1:n, key-exchange and aes encrypt.
  • filetransfer Transfer a file to another machine as soon as possible

cyclone's People

Contributors

thejinchao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.