public
Description: Io programming language
Homepage: http://iolanguage.com
Clone URL: git://github.com/stevedekorte/io.git
Allow setting of a readTimeout for the DNSResolver
richcollins (author)
Tue Mar 25 18:33:15 -0700 2008
commit  058537cb041e0a7b98aa2528cf69091a1a8c6806
tree    e31f23b8ff302e686c533d73239b5c69428a0b80
parent  cba3b2cd4ba9c0889dc23b2aa02c533c07162c93
...
86
87
88
 
 
89
90
91
...
130
131
132
133
 
134
135
136
...
86
87
88
89
90
91
92
93
...
132
133
134
 
135
136
137
138
0
@@ -86,6 +86,8 @@ ipForYahoo := DNSResolver ipForHostName("yahoo.com")
0
 </pre>
0
 */
0
 
0
+ readTimeout ::= 10
0
+
0
   init := method(
0
     //doc DNSResolver dnsServers Returns list of DNSServer objects used for lookups.
0
     self dnsServers := List clone
0
@@ -130,7 +132,7 @@ ipForYahoo := DNSResolver ipForHostName("yahoo.com")
0
       dnsServers foreach(dnsServer,
0
         debugWriteln("sending query")
0
         //try(ip = dnsServer ipForHostName(hostName))
0
- ip = dnsServer ipForHostName(hostName)
0
+ ip = dnsServer ipForHostName(hostName, readTimeout)
0
         ip isError ifTrue(continue)
0
         ip ifNonNil(break)
0
       )

Comments

    No one has commented yet.