From b2caea0cbad781e3ee713229c33ccce23db8a2a3 Mon Sep 17 00:00:00 2001 From: James Crayne Date: Sat, 3 Nov 2018 09:04:29 -0400 Subject: PacketRequests are lossless * PR's are lossless as I originally thought * Also packets between 16 and 192 are lossless. (not sure how/why these things got changed) --- src/Data/Tox/Message.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Data/Tox') diff --git a/src/Data/Tox/Message.hs b/src/Data/Tox/Message.hs index b77307a2..29b9f832 100644 --- a/src/Data/Tox/Message.hs +++ b/src/Data/Tox/Message.hs @@ -75,8 +75,9 @@ data LossyOrLossless = Lossless | Lossy -- | Classify a packet as lossy or lossless. lossyness :: MessageID -> LossyOrLossless +lossyness (fromEnum -> 1) = Lossless lossyness (fromEnum -> x) | x < 3 = Lossy -lossyness (fromEnum -> x) | {-16 <= x,-} x < 192 = Lossless +lossyness (fromEnum -> x) | 16 <= x, x < 192 = Lossless lossyness (fromEnum -> x) | 192 <= x, x < 255 = Lossy lossyness (fromEnum -> 255) = Lossless -- cgit v1.2.3