On 21/08/15 13:27, Burak Özalp wrote:
Hi Burak,
> I wrote the following code(
http://codepad.org/Y7R8R5dw) to listen o UDP
> port like a server, and response the client with changed the Truncated
> Bit=1. But i have two problems;
>
>
> 1) The program doesn't terminate and stuck on the line "
> response=dns.query.udp(r,UDP_IP,port=UDP_PORT)"
The dns.query.udp function is ONLY for SENDING queries, not for
receiving anything from the network.
In order to write a server for listening to the network, and receiving
DNS queries, you'll have to use something like the SocketServer module.
The dnspython module does not contain any server code.
Regards,
Anand