added code for optional ack-based sender flow control
added code for optional ack-based sender flow control