The server's main loop.
The server's main loop.
startupCallback
is used for internal testing; it's called upon server start,
notifying the caller that the server is ready to run.
WARNING: the callback runs in the server's thread, blocking the server from doing any work until the callback is finished. Callbacks should be kept simple and clients should not try to interact with the server while the callback is processing.