Пример #1
0
        /// <summary>
        /// Handles the native callback.
        /// </summary>
        private void HandleNewServerRpc(bool success, BatchContextSafeHandle ctx)
        {
            // TODO: handle error

            CallSafeHandle call = ctx.GetServerRpcNewCall();
            string method = ctx.GetServerRpcNewMethod();

            // after server shutdown, the callback returns with null call
            if (!call.IsInvalid)
            {
                Task.Run(async () => await InvokeCallHandler(call, method));
            }

            AllowOneRpc();
        }