Add thread acceptor prototype and fix server function to return a value.