dns-2.0.12: DNS library in Haskell

Safe HaskellNone
LanguageHaskell2010

Network.DNS.Decode

Synopsis

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.

receive :: Socket -> IO DNSMessage #

Receiving DNS data from Socket and parse it.

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.