RPC server side code: