give an implementation of c++ socket based server on Linux and Windows platforms