summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2018-09-07 13:50:30 -0400
committerJoe Crayne <joe@jerkface.net>2018-09-07 13:50:30 -0400
commitfe6e8bf7cd367afe785ed50914bc2a20d272e546 (patch)
tree3388a18642779f0e8c45f6cc9132a9b9202de722 /src
parentae549a06377b0c58a118679714b700362f54a30f (diff)
KillPacket and PacketRequest are treated as lossy (bypass packet-queue).
Diffstat (limited to 'src')
-rw-r--r--src/Network/Tox/Crypto/Transport.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Network/Tox/Crypto/Transport.hs b/src/Network/Tox/Crypto/Transport.hs
index 8bb41254..3ade25f7 100644
--- a/src/Network/Tox/Crypto/Transport.hs
+++ b/src/Network/Tox/Crypto/Transport.hs
@@ -754,11 +754,11 @@ data LossyOrLossless = UnknownLossyness | Lossless | Lossy
754 deriving (Eq,Ord,Enum,Show,Bounded) 754 deriving (Eq,Ord,Enum,Show,Bounded)
755 755
756lossyness :: MessageID -> LossyOrLossless 756lossyness :: MessageID -> LossyOrLossless
757-- lossyness (fromEnum -> x) | x < 3 = Lossy 757lossyness (fromEnum -> x) | x < 3 = Lossy
758lossyness (fromEnum -> x) | {-x >= 16,-} x < 192 = Lossless 758lossyness (fromEnum -> x) | {-x >= 16,-} x < 192 = Lossless
759lossyness (fromEnum -> x) | x >= 192, x < 255 = Lossy 759lossyness (fromEnum -> x) | x >= 192, x < 255 = Lossy
760lossyness (fromEnum -> 255) = Lossless 760lossyness (fromEnum -> 255) = Lossless
761lossyness _ = UnknownLossyness 761lossyness _ = UnknownLossyness
762 762
763isKillPacket :: MessageType -> Bool 763isKillPacket :: MessageType -> Bool
764isKillPacket (Msg KillPacket) = True 764isKillPacket (Msg KillPacket) = True