This line is currently made async, to avoid the S.UDP.listen callback to block when the conntest protocol is slower than UDP datagrams can be received. If an Lwt_stream was used instead of an Lwt_mvar, there would be no need for this.
As the protocol has an acknowledge mechanism (done each n packets), this stream will be guaranteed not to grow in size indefinately. This just allows the conntest protocol to run a bit out of sync from when UDP datagrams are received.
Switch out these types for the sink field in the Udp_flow.t type
This line is currently made
async, to avoid the S.UDP.listen callback to block when theconntestprotocol is slower thanUDPdatagrams can be received. If anLwt_streamwas used instead of anLwt_mvar, there would be no need for this.As the protocol has an acknowledge mechanism (done each n packets), this stream will be guaranteed not to grow in size indefinately. This just allows the
conntestprotocol to run a bit out of sync from whenUDPdatagrams are received.Switch out these types for the
sinkfield in theUdp_flow.ttype