private async static Task HandleRequestAsync(ProcessState state, CancellationToken token)
        {
            var responseData = await state.RequestCallbackAsync(state.Data, token).ConfigureAwait(false);

            if (responseData != null)
            {
                try
                {
                    lock (state.StreamWriteLock)
                    {
                        state.Stream.WriteFrame(
                            transactionId: state.TransactionId,
                            data: responseData,
                            offset: 0,
                            count: (ushort)responseData.Length);
                    }
                }
                catch (Exception e)
                {
                    state.Logger.Verbose($"Failed to write to client: e={e}");
                }
            }
            else
            {
                state.Logger.Warning($"Failed to receive response data.");
            }
        }