/ppserver

Ping-Pong Server: A simple multi-threaded server and client demo in C11 using pthreads.

Primary LanguageCMIT LicenseMIT

Ping-Pong CS

A simple multi-threaded server demo in C11 using pthreads.


Running

Once build (see below) run ping-pong -h

Prerequisites

Install CMake 3 on CentOS

$ sudo yum -y install epel-release
$ sudo yum -y install cmake3

Install CMake on MacOS

On macos you'll need if you haven't yet, first install brew. Then:

$ brew install cmake

Build

Substitute <RELEASE_NAME> below with either Release of Debug. After build is finished the executable name will be ping-pong.

$ src/ping-pong -h

Build on CentOS

$ mkdir linux
$ cd linux
$ cmake3 -DCMAKE_BUILD_TYPE=<RELEASE_NAME> ../
$ make

Build on MacOS

I.e. for a specific version of gcc:

$ mkdir darwin
$ cd darwin
$ cmake -DCMAKE_BUILD_TYPE=<RELEASE_NAME> -DCMAKE_C_COMPILER=gcc-7  ../
$ make