summaryrefslogtreecommitdiff
path: root/src/Network/Tox/NodeId.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Tox/NodeId.hs')
-rw-r--r--src/Network/Tox/NodeId.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Network/Tox/NodeId.hs b/src/Network/Tox/NodeId.hs
index f9cf22a8..e3c6fb36 100644
--- a/src/Network/Tox/NodeId.hs
+++ b/src/Network/Tox/NodeId.hs
@@ -498,6 +498,12 @@ instance OnionPacket 3 where mkOnion = OnionResponse3
498data NoSpam = NoSpam !Word32 !(Maybe Word16) 498data NoSpam = NoSpam !Word32 !(Maybe Word16)
499 deriving (Eq,Ord,Show) 499 deriving (Eq,Ord,Show)
500 500
501instance Serialize NoSpam where
502 get = NoSpam <$> get <*> get
503 put (NoSpam w32 w16) = do
504 put w32
505 put w16
506
501-- Utilizes Data.Serialize format for Word32 nospam and Word16 checksum. 507-- Utilizes Data.Serialize format for Word32 nospam and Word16 checksum.
502instance Read NoSpam where 508instance Read NoSpam where
503 readsPrec d s = case break isSpace s of 509 readsPrec d s = case break isSpace s of