From 4869629a14a440e3423033a11e11e4f2434a1660 Mon Sep 17 00:00:00 2001 From: "jim@bo" Date: Fri, 22 Jun 2018 16:16:53 -0400 Subject: haddock for peekPacket function --- src/Data/PacketQueue.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/Data/PacketQueue.hs b/src/Data/PacketQueue.hs index 82b6f8f0..ffe00d7d 100644 --- a/src/Data/PacketQueue.hs +++ b/src/Data/PacketQueue.hs @@ -245,6 +245,7 @@ toPNums snum ns = reverse . snd $ foldl doOne (snum-1,[]) ns doOne (addend,as) x = let y = fromIntegral x + addend in (y,y:as) +-- | Makes no modifications to the PacketOutQueue state, useful for lossy packets peekPacket :: STM extra -> PacketOutQueue extra msg wire fromwire -> msg -> STM (Maybe (wire,Word32)) peekPacket getExtra q@(PacketOutQueue { pktoInPQ, pktoOutPQ, pktoPacketNo, pktoToWireIO, pktoToWire }) msg = do -- cgit v1.2.3