diff options
author | Joe Crayne <joe@jerkface.net> | 2018-08-21 02:03:42 -0400 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2018-08-21 02:04:13 -0400 |
commit | a11ea7f098aea0ea933d6f778f4b29a9949693d1 (patch) | |
tree | 57f45c955508a123db2a04c4a8bd547ebe237893 /src/Data | |
parent | edbc10169d7cf363928bdcae2385b64cfdf54675 (diff) |
Added packet data to lossy inbound event.
Diffstat (limited to 'src/Data')
-rw-r--r-- | src/Data/PacketBuffer.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Data/PacketBuffer.hs b/src/Data/PacketBuffer.hs index f01abb28..d2e96d11 100644 --- a/src/Data/PacketBuffer.hs +++ b/src/Data/PacketBuffer.hs | |||
@@ -47,6 +47,7 @@ data PacketInboundEvent a | |||
47 | , peAcknowledgedNum :: Word32 -- ^ Earliest sequence number they've seen from us. | 47 | , peAcknowledgedNum :: Word32 -- ^ Earliest sequence number they've seen from us. |
48 | } | 48 | } |
49 | | PacketReceivedLossy { peSeqNum :: Word32 -- ^ Sequence number for lossy packet. | 49 | | PacketReceivedLossy { peSeqNum :: Word32 -- ^ Sequence number for lossy packet. |
50 | , peReceivedPayload :: a -- ^ Payload packet they sent to us (ignored). | ||
50 | , peAcknowledgedNum :: Word32 -- ^ Earliest sequence number they've seen from us. | 51 | , peAcknowledgedNum :: Word32 -- ^ Earliest sequence number they've seen from us. |
51 | } | 52 | } |
52 | deriving Functor | 53 | deriving Functor |
@@ -66,7 +67,7 @@ grokInboundPacket :: PacketBuffer a b -> PacketInboundEvent a -> STM () | |||
66 | grokInboundPacket (PacketBuffer inb outb) (PacketReceived seqno a ack) | 67 | grokInboundPacket (PacketBuffer inb outb) (PacketReceived seqno a ack) |
67 | = do Q.enqueue inb seqno a | 68 | = do Q.enqueue inb seqno a |
68 | Q.dropPacketsBefore outb ack | 69 | Q.dropPacketsBefore outb ack |
69 | grokInboundPacket (PacketBuffer inb outb) (PacketReceivedLossy seqno ack) | 70 | grokInboundPacket (PacketBuffer inb outb) (PacketReceivedLossy seqno _ ack) |
70 | = do Q.observeOutOfBand inb seqno | 71 | = do Q.observeOutOfBand inb seqno |
71 | Q.dropPacketsBefore outb ack | 72 | Q.dropPacketsBefore outb ack |
72 | 73 | ||