Ticket #3217: example1

File example1, 358 bytes (added by pittipatti, 7 years ago)

Example 1

Line 
1from twisted.names import client, resolve
2import time
3
4def request():
5    server='192.168.2.1'
6    theResolver = client.Resolver( servers = [ ( server, 53 )], timeout = ( 4, ) )
7    dnsResolver     = resolve.ResolverChain( [ theResolver ] )
8    d = dnsResolver.lookupAddress( "www.heise.de" )
9
10for i in range(500):
11    print i
12    request()
13time.sleep(60)
14