From 7ab09c43f0bb6f8f42c0156644869dfe78aa0b89 Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 21 Oct 2017 22:01:16 -0400 Subject: Renamed Assym -> Asymm (short for asymmetric). --- src/Network/Tox/Onion/Handlers.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Network/Tox/Onion/Handlers.hs') diff --git a/src/Network/Tox/Onion/Handlers.hs b/src/Network/Tox/Onion/Handlers.hs index 103c216b..23673273 100644 --- a/src/Network/Tox/Onion/Handlers.hs +++ b/src/Network/Tox/Onion/Handlers.hs @@ -46,8 +46,8 @@ classify :: Message -> MessageClass String PacketKind TransactionId classify msg = go msg where go (OnionAnnounce announce) = IsQuery AnnounceType - $ TransactionId (snd $ runIdentity $ assymData announce) - (assymNonce announce) + $ TransactionId (snd $ runIdentity $ asymmData announce) + (asymmNonce announce) go (OnionAnnounceResponse n8 n24 resp) = IsResponse (TransactionId n8 n24) go (OnionToRoute {}) = IsQuery DataRequestType (TransactionId (Nonce8 0) (Nonce24 zeros24)) go (OnionToRouteResponse {}) = IsResponse (TransactionId (Nonce8 0) (Nonce24 zeros24)) @@ -116,7 +116,7 @@ dataToRouteH :: -> addr -> OnionMessage f -> IO () -dataToRouteH keydb udp _ (OnionToRoute pub assym) = do +dataToRouteH keydb udp _ (OnionToRoute pub asymm) = do let k = key2id pub mb <- atomically $ do ks <- readTVar keydb @@ -125,7 +125,7 @@ dataToRouteH keydb udp _ (OnionToRoute pub assym) = do return rpath forM_ mb $ \rpath -> do -- forward - sendMessage udp (toOnionDestination rpath) $ OnionToRouteResponse assym + sendMessage udp (toOnionDestination rpath) $ OnionToRouteResponse asymm hPutStrLn stderr $ "Forwarding data-to-route -->"++show k type NodeDistance = NodeId @@ -150,7 +150,7 @@ insertKey tm pub toxpath d keydb = AnnouncedKeys } areq :: Message -> Either String AnnounceRequest -areq (OnionAnnounce assym) = Right $ fst $ runIdentity $ assymData assym +areq (OnionAnnounce asymm) = Right $ fst $ runIdentity $ asymmData asymm areq _ = Left "Unexpected non-announce OnionMessage" handlers :: Transport err (OnionDestination r) Message @@ -189,13 +189,13 @@ announceSerializer getTimeout = MethodSerializer , method = AnnounceType , wrapQuery = \(TransactionId n8 n24) src dst req -> -- :: tid -> addr -> addr -> a -> OnionMessage Identity - OnionAnnounce $ Assym + OnionAnnounce $ Asymm { -- The public key is our real long term public key if we want to -- announce ourselves, a temporary one if we are searching for -- friends. senderKey = onionKey src - , assymNonce = n24 - , assymData = Identity (req, n8) + , asymmNonce = n24 + , asymmData = Identity (req, n8) } , unwrapResponse = \case -- :: OnionMessage Identity -> b OnionAnnounceResponse _ _ resp -> Just $ runIdentity resp -- cgit v1.2.3