adhoc-network-1.0.3: Ad-hoc P2P network protocolSource codeContentsIndex
Network.AdHoc.ParserStrict
MaintainerHenning Guenther
Description
A module containing functions to parse the XML specified by the protocol into the internal message types.
Synopsis
parseMessageNoValidate :: Document Posn -> Either String ExternalMessage
parseMessage :: (String -> Signature -> UserID -> SignatureStatus) -> Document Posn -> Either String ExternalMessage
parseInnerMessage :: Document Posn -> Either String (Either (UserID, RSAEncrypted String) (UTCTime, String, [Attachment]))
Documentation
parseMessageNoValidate :: Document Posn -> Either String ExternalMessageSource
Parses a message without verifying the signature. It must only be used for testing or debugging issues!
parseMessageSource
:: String -> Signature -> UserID -> SignatureStatusA validation function for signatures.
-> Document PosnThe XML Document to be parsed.
-> Either String ExternalMessageLeft err on failure, err describs the error. Right msg on success.
Given a validation function for signatures, this function parses an XML Document into an ExternalMessage.
parseInnerMessageSource
:: Document PosnThe XML Document to be parsed.
-> Either String (Either (UserID, RSAEncrypted String) (UTCTime, String, [Attachment]))Left err in case of a parsing failure; Right msg on success. msg either is one more obscured message or the final message to be flooded.
Parses an Obscure-message.
Produced by Haddock version 2.6.1