def run_on_server(gen_each_reply, requests)
      replies = nil

      # Pass in the optional call object parameter if possible
      if gen_each_reply.arity == 1
        replies = gen_each_reply.call(requests)
      elsif gen_each_reply.arity == 2
        replies = gen_each_reply.call(requests, @req_view)
      else
        fail 'Illegal arity of reply generator'
      end

      write_loop(replies, is_client: false)
    end
def run_on_server(gen_each_reply, requests)
      replies = nil

      # Pass in the optional call object parameter if possible
      if gen_each_reply.arity == 1
        replies = gen_each_reply.call(requests)
      elsif gen_each_reply.arity == 2
        replies = gen_each_reply.call(requests, @req_view)
      else
        fail 'Illegal arity of reply generator'
      end

      write_loop(replies, is_client: false)
    end
Begins orchestration of the Bidi stream for a server generating replies.

 N.B. gen_each_reply is a func(Enumerable<Requests>)

 It takes an enumerable of requests as an arg, in case there is a
 relationship between the stream of requests and the stream of replies.

 This does not mean that must necessarily be one.  E.g, the replies
 produced by gen_each_reply could ignore the received_msgs

 @param [Proc] gen_each_reply generates the BiDi stream replies.
 @param [Enumerable] requests The enumerable of requests to run