server example code of c or c++