dns-3.0.4: DNS library in Haskell
Safe Haskell None
Language Haskell2010

Network.DNS.IO

Synopsis

Receiving from socket

receive :: Socket -> IO DNSMessage Source #

Receiving DNS data from Socket and parse it.

receiveVC :: Socket -> IO DNSMessage Source #

Receive and parse a single virtual-circuit (TCP) query or response. It is up to the caller to implement any desired timeout.

Sending to socket

send :: Socket -> ByteString -> IO () Source #

Sending composed query or response to Socket .

sendVC :: Socket -> ByteString -> IO () Source #

Sending composed query or response to a single virtual-circuit (TCP).

Creating Query

encodeQuestions Source #

Arguments

:: Identifier
-> [ Question ]
-> [ ResourceRecord ]

Additional RRs for EDNS.

-> Bool

Authentication

-> ByteString

Creating query.

composeQuery :: Identifier -> [ Question ] -> ByteString Source #

Deprecated: Use encodeQuestions instead

Composing query without EDNS0.

composeQueryAD :: Identifier -> [ Question ] -> ByteString Source #

Deprecated: Use encodeQuestions instead

Composing query with authentic data flag set without EDNS0.

Creating Response

responseA :: Identifier -> Question -> [ IPv4 ] -> DNSMessage Source #

Composing a response from IPv4 addresses

responseAAAA :: Identifier -> Question -> [ IPv6 ] -> DNSMessage Source #

Composing a response from IPv6 addresses