---> cb ::dns::1
...
::dns::1(sock) = sock12
...
socket=sock12
Two different sockets with identical names!!!
This happens consistently on MacOS 10.2.8 Tcl 8.4.9
(sorry for not having a more recent one).
I have tested WinXP using 8.4.12 (I guess) and it happened once,
and then I couldn't reproduce it anymore.
Ideas? Mats
package require dns
proc cb {token} {
global s
puts "---> cb $token"
parray $token
set s [socket -async google.com 80]
fconfigure $s -blocking 0
fileevent $s writable writable
puts "\t socket=$s"
# Try with and without cleanup.
dns::cleanup $token
}
proc writable {args} {
global s
puts "+++> writable s=$s"
close $s
}
dns::resolve google.com -command cb -protocol tcp