summaryrefslogtreecommitdiff
path: root/src/Data
diff options
context:
space:
mode:
authorjim@bo <jim@bo>2018-06-22 16:16:53 -0400
committerjim@bo <jim@bo>2018-06-22 16:16:53 -0400
commit4869629a14a440e3423033a11e11e4f2434a1660 (patch)
tree79bd2d2938d28f97adf361bc166822a0759c4651 /src/Data
parent54af27be179f998b17ecff9b5499214df09fb0b2 (diff)
haddock for peekPacket function
Diffstat (limited to 'src/Data')
-rw-r--r--src/Data/PacketQueue.hs1
1 files changed, 1 insertions, 0 deletions
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
245 doOne (addend,as) x = let y = fromIntegral x + addend 245 doOne (addend,as) x = let y = fromIntegral x + addend
246 in (y,y:as) 246 in (y,y:as)
247 247
248-- | Makes no modifications to the PacketOutQueue state, useful for lossy packets
248peekPacket :: STM extra -> PacketOutQueue extra msg wire fromwire -> msg -> STM (Maybe (wire,Word32)) 249peekPacket :: STM extra -> PacketOutQueue extra msg wire fromwire -> msg -> STM (Maybe (wire,Word32))
249peekPacket getExtra q@(PacketOutQueue { pktoInPQ, pktoOutPQ, pktoPacketNo, pktoToWireIO, pktoToWire }) msg 250peekPacket getExtra q@(PacketOutQueue { pktoInPQ, pktoOutPQ, pktoPacketNo, pktoToWireIO, pktoToWire }) msg
250 = do 251 = do