To create a multithreaded HTTP server you need to create an according server object with the number of desired threads. Then you start all the threads and after maybe doing something useful you must wait for the termination of all the threads.
TcpIpConnection conn (true, host, port); HttpProtocol prot(&conn); HttpServer http_server (&prot, num_threads); Dispatcher rpc_server; http_server.setRpcDispatcher(&rpc_server); rpc_server.addMethod(&testcall, Struct::getValueName(), "testcall", Integer::getValueName() + "," + Integer::getValueName(), "Testcase with a c-function"); http_server.addHttpHandler("get", make_methodhandler(rpcinfo, &RpcInfoHandler::handler)); http_server.addHttpHandler("post", make_methodhandler(rpcinfo, &RpcInfoHandler::handler)); http_server.addRealm("/", "http-root-resource"); http_server.addAuthentication("ali-baba", "open-sesame", "http-root-resource"); http_server.addRealm("/RPC2", "rpc2-resource"); http_server.addAuthentication("ali-baba-rpc", "open-sesame-rpc", "rpc2-resource"); CppString root_dir = "/usr/local/ulxmlrpcpp/public_html"; http_server.setHttpRoot(root_dir); unsigned started = http_server.runPicoHttpd(); do_some_work(); http_server.waitAsync(false, true);