Do it in much the same way you would do it in C ++ 98. You can replace some platform-specific things like pthread_t, pthread_mutex and pthread_cond with standardized equivalents (std :: thread, std :: {recursive _,} {timed _,} mutex and std :: condition_variable {, _ any}), but the basic design is the same.
As @beerboy noted, Boost.Asio could be a good place to start, although AFAIK is not yet updated for C ++ 11.
source share