Safe Haskell | None |
---|---|
Language | Haskell2010 |
Network.DNS.Decode
- decode :: ByteString -> Either String DNSMessage
- decodeMany :: ByteString -> Either String ([DNSMessage], ByteString)
- receive :: Socket -> IO DNSMessage
- receiveVC :: Socket -> IO DNSMessage
Documentation
decode :: ByteString -> Either String DNSMessage #
Parsing DNS data.
decodeMany :: ByteString -> Either String ([DNSMessage], ByteString) #
Parse many length-encoded DNS records, for example, from TCP traffic.
receiveVC :: Socket -> IO DNSMessage #
Receive and parse a single virtual-circuit (TCP) response. It is up to the caller to implement any desired timeout. This (and the other response decoding functions) may throw ParseError when the server response is incomplete or malformed.