Register a callback to be invoked when the server starts listening for connections. The callback value must be executable, otherwise an exception will be thrown.
If a callback is already registered, it will be replaced.
Throws
If the provided callback value is not executable.