All Projects → ossrs → State Threads

ossrs / State Threads

Light-weight thread library, coroutine or c++ goroutine , patched for SRS.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to State Threads

Tina
Tina is a teeny tiny, header only, coroutine and job library.
Stars: ✭ 125 (-75%)
Mutual labels:  coroutines, fiber
Lightio
LightIO is a userland implemented green thread library for ruby
Stars: ✭ 165 (-67%)
Mutual labels:  fiber, networking
Fiber Ext
stackful-coroutines for PHP
Stars: ✭ 142 (-71.6%)
Mutual labels:  coroutines, fiber
Libfiber
The high performance coroutine library for Linux/FreeBSD/MacOS/Windows, supporting select/poll/epoll/kqueue/iocp/windows GUI
Stars: ✭ 519 (+3.8%)
Mutual labels:  coroutines, fiber
Minicoro
Single header asymmetric stackful cross-platform coroutine library in pure C.
Stars: ✭ 164 (-67.2%)
Mutual labels:  coroutines, fiber
Wesher
wireguard overlay mesh network manager
Stars: ✭ 461 (-7.8%)
Mutual labels:  networking
Wireguard Manager
Self-hosted Wireguard Installer / Manager for CentOS, Debian, Ubuntu, Arch, Fedora, Redhat, Raspbian
Stars: ✭ 478 (-4.4%)
Mutual labels:  networking
Elle
The Elle coroutine-based asynchronous C++ development framework.
Stars: ✭ 459 (-8.2%)
Mutual labels:  coroutines
Networkservicemesh
The Hybrid/Multi-cloud IP Service Mesh
Stars: ✭ 456 (-8.8%)
Mutual labels:  networking
Airshare
Cross-platform content sharing in a local network
Stars: ✭ 497 (-0.6%)
Mutual labels:  networking
Libzt
ZeroTier Sockets - Put a network stack in your app
Stars: ✭ 486 (-2.8%)
Mutual labels:  networking
Groupco
PHP的服务化框架。适用于Api、Http Server、Rpc Server;帮助原生PHP项目转向微服务化。出色的性能与支持高并发的协程相结合
Stars: ✭ 473 (-5.4%)
Mutual labels:  coroutines
Curlcpp
An object oriented C++ wrapper for CURL (libcurl)
Stars: ✭ 462 (-7.6%)
Mutual labels:  networking
Gns3 Server
GNS3 server
Stars: ✭ 477 (-4.6%)
Mutual labels:  networking
Tenus
Linux networking in Go
Stars: ✭ 458 (-8.4%)
Mutual labels:  networking
Xniffer
A swift network profiler built on top of URLSession.
Stars: ✭ 488 (-2.4%)
Mutual labels:  networking
Under The Hood Reactjs
Entire React code base explanation by visual block schemes (Stack version)
Stars: ✭ 4,794 (+858.8%)
Mutual labels:  fiber
Cnp3
Computer Networking : Principles, Protocols and Practice (first and second edition, third edition is being written on https://github.com/cnp3/ebook)
Stars: ✭ 471 (-5.8%)
Mutual labels:  networking
School Of Sre
At LinkedIn, we are using this curriculum for onboarding our entry-level talents into the SRE role.
Stars: ✭ 5,141 (+928.2%)
Mutual labels:  networking
Ucx
Unified Communication X (mailing list - https://elist.ornl.gov/mailman/listinfo/ucx-group)
Stars: ✭ 471 (-5.8%)
Mutual labels:  networking

state-threads

Fork from http://sourceforge.net/projects/state-threads, patched for SRS.

See: https://github.com/ossrs/state-threads/blob/srs/README

For original ST without any changes, checkout the ST master branch.

Usage

Get code:

git clone https://github.com/ossrs/state-threads.git &&
cd state-threads && git checkout srs

For Linux:

make linux-debug EXTRA_CFLAGS="-DMD_HAVE_EPOLL"

For OSX:

make darwin-debug EXTRA_CFLAGS="-DMD_HAVE_KQUEUE"

Linux with valgrind:

make linux-debug EXTRA_CFLAGS="-DMD_VALGRIND"

Remark: User must install valgrind, for instance, in centos6 sudo yum install -y valgrind valgrind-devel.

Linux with valgrind and epoll:

make linux-debug EXTRA_CFLAGS="-DMD_HAVE_EPOLL -DMD_VALGRIND"

For OSX, user must specifies the valgrind header files:

make darwin-debug EXTRA_CFLAGS="-DMD_HAVE_KQUEUE -DMD_VALGRIND -I/usr/local/include"

Remark: Latest OSX does not support ST, please use docker to run ST.

Branch SRS

The branch srs will be patched the following patches:

GDB Tools

Valgrind

How to debug with gdb under valgrind, read valgrind manual.

About startup parameters, read valgrind cli.

Important cli options:

  1. --undef-value-errors=<yes|no> [default: yes], Controls whether Memcheck reports uses of undefined value errors. Set this to no if you don't want to see undefined value errors. It also has the side effect of speeding up Memcheck somewhat.
  2. --leak-check=<no|summary|yes|full> [default: summary], When enabled, search for memory leaks when the client program finishes. If set to summary, it says how many leaks occurred. If set to full or yes, each individual leak will be shown in detail and/or counted as an error, as specified by the options --show-leak-kinds and --errors-for-leak-kinds.
  3. --track-origins=<yes|no> [default: no], Controls whether Memcheck tracks the origin of uninitialised values. By default, it does not, which means that although it can tell you that an uninitialised value is being used in a dangerous way, it cannot tell you where the uninitialised value came from. This often makes it difficult to track down the root problem.
  4. --show-reachable=<yes|no> , --show-possibly-lost=<yes|no>, to show the using memory.

UTest and Coverage

First of all, download google test to utest/gtest, check by:

ls -lh utest/gtest/include/gtest/gtest.h >/dev/null && echo yes

To make ST with utest and run it:

make linux-debug-gcov && ./obj/st_utest

For macOS: make darwin-debug-gcov && ./obj/st_utest

Run utest without coverage: make darwin-debug-utest && ./obj/st_utest

Then, install gcovr for coverage:

yum install -y python2-pip &&
pip install lxml && pip install gcovr

For macOS: pip3 install gcovr

Finally, run test and get the report

mkdir -p coverage &&
gcovr -r . -e LINUX -e DARWIN -e examples --html --html-details -o coverage/st.html &&
open coverage/st.html

Note: We ignore LINUX* and DARWIN* which is obj actually.

Or just run locally:

bash auto/coverage.sh

Docs & Analysis

Winlin 2016

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].