This is an example I used in my C++ lectures, mostly to demonstrate the use of concurrency.
There are different versions from different lecture, each of which has its own branch. So please switch branches to get the version you are looking for.
The branches are
This is the first version I showed in the lecture on concurrency
This is a slightly modified version that I showed in a lecture on expceptions (it catches an error when the port number entered is not a number)
contains the most up to date version (i.e. exceptionsLecture)