added functionality for callbacks when sending guicommands to the server process.