Git Product home page Git Product logo

shared-state-async's Introduction

C++ Socket server epool coroutines (c++20)

  • Sources, headers and mains separated in distinct folders
  • Use of modern CMake for much easier compiling
  • Setup for tests using doctest
  • Code coverage reports (TODO:review this) including automatic upload to Coveralls.io and/or Codecov.io
  • Code documentation with Doxygen

Requirements

doxygen lcov build-essential gdb cmake

sudo apt install doxygen lcov build-essential gdb cmake

Structure

You can find main executable in app/main.cc under the Build section in CMakeLists.txt.

Building, Testing and Running

Build by making a build directory (i.e. build/), run cmake in that dir, and then use make to build the desired target.

Example:

> mkdir build && cd build
> cmake .. -DCMAKE_BUILD_TYPE=[Debug | Coverage | Release]
> make

For testing, first start the main executable and then run the python test script in another console

> ./main         # Runs the main executable
> python3 ../tests/python-testclient/pythonTcpClient.py #runs a sample python client 

For unit testing folow this instructions

> make test      # Makes and runs the tests.
> make coverage  # Makes and runs the tests, then Generates a coverage report. (requires "cmake .. -DCMAKE_BUILD_TYPE=Coverage")
> make doc       # Generate html documentation.
> ./unit_tests -s #runs unittests with details
> 

Testing

There are some simple tests implemented in C++ the most important test is a set of scripts

start the main app in a console and in another console type one of the following
/tests/python-testclient$ python pythonTcpClient.py -ip 127.0.0.1 /tests/python-testclient$ python pythonTcpClient.py -ip 127.0.0.1 -f ../samplestate.txt /tests/python-testclient$ ./runclientlocal.sh

shared-state-async's People

Contributors

g10h4ck avatar javierajorge avatar javierbrk avatar

Stargazers

Yiwei Yang avatar

Watchers

James Cloos avatar  avatar

Forkers

g10h4ck

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.