A simple multi-threaded server demo in C11 using pthreads.
Once build (see below) run ping-pong -h
$ sudo yum -y install epel-release
$ sudo yum -y install cmake3
On macos
you'll need if you haven't yet, first install brew. Then:
$ brew install cmake
Substitute <RELEASE_NAME>
below with either Release
of Debug
.
After build is finished the executable name will be ping-pong
.
$ src/ping-pong -h
$ mkdir linux
$ cd linux
$ cmake3 -DCMAKE_BUILD_TYPE=<RELEASE_NAME> ../
$ make
I.e. for a specific version of gcc
:
$ mkdir darwin
$ cd darwin
$ cmake -DCMAKE_BUILD_TYPE=<RELEASE_NAME> -DCMAKE_C_COMPILER=gcc-7 ../
$ make