From 05f443e31b52de18e6e2dd3b7b7bd599f28e4a6f Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Thu, 28 Nov 2019 21:10:25 -0500 Subject: Prefer IPv4 when parsing TCP nodes JSON. --- dht/src/Data/Tox/Msg.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dht/src/Data/Tox/Msg.hs') diff --git a/dht/src/Data/Tox/Msg.hs b/dht/src/Data/Tox/Msg.hs index 66ec6eb1..8819faa7 100644 --- a/dht/src/Data/Tox/Msg.hs +++ b/dht/src/Data/Tox/Msg.hs @@ -97,6 +97,7 @@ deriving instance (Show (Pkt a)) type CryptoMessage = DSum Pkt Identity +msgID :: DSum Pkt Identity -> SomeMsg msgID (Pkt mid :=> Identity _) = M mid -- TODO @@ -227,6 +228,7 @@ fromEnum8 = fromIntegral . fromEnum data LossyOrLossless = Lossless | Lossy deriving (Eq,Ord,Enum,Show,Bounded) +someLossyness :: SomeMsg -> LossyOrLossless someLossyness (M m) = lossyness m lossyness :: KnownNat n => Msg n t -> LossyOrLossless -- cgit v1.2.3