Skip to content
Tcl Source Code Artifact [7e32896b18]
Login

Artifact [7e32896b18]

Artifact 7e32896b18a7480396933878288f1499777ec889:

Ticket change [7e32896b18] - New ticket [478565ffffffffff|478565ffff] <i>fconfigure -sockname performance issue</i>. by nobody on 2001-11-06 05:25:50.
D 2001-11-06T05:25:50
J assignee andreas_kupries
J cmimetype text/plain
J comment On\sWindows\sNT\s4.0\sSP6a\swith\sTcl\s8.3.2,\susing\sfconfigure\s-sockname\son\sa\sserver\ssocket\scan\s\ncause\s\na\s10-20\ssecond\sdelay\sdepending\supon\sthe\ssystem\sconfiguration.\n\nThe\sfollowing\scode\ssnippet\sillustrates\sthe\sbehavior:\n\nproc\sServerAccept\s{\scid\saddr\sport\s}\s{\n\s\s\s\sreturn\n}\nset\ssock\s[socket\s-server\sServerAccept\s0]\nputs\s"socket:\s$sock"\nset\sdata\s[fconfigure\s$sock\s-sockname]\nputs\s"DATA:\s$data"\n\nfconfigure\s-sockname\striggers\sa\scall\sto\sgethostbyaddr()\son\sthe\slocal\sIP\saddress,\s0.0.0.0\sin\sthis\s\ncase.\s\sOn\sNT\s4.0\s(but\snot\sWindows\s2000\sor\sUNIX),\sthis\sleads\sto\sa\s10-20\ssecond\sdelay\swhile\sthe\s\ngethostbyaddr()\scall\stimes\sout.\n\nAlthough\sthis\sis\sactually\san\sNT\sissue\sand\snot\sa\sTcl\sone,\sa\ssimple\sworkaround\sin\sthe\sTcl\scode\swould\s\nbe\sto\savoid\sthe\sgethostbyaddr()\scall\sif\sthe\sIP\saddress\sis\s0.0.0.0\son\sNT\s4.0.\s\sA\sworkaround\sfor\sthe\s\nend\suser\swith\sthe\scurrent\scode\sis\sto\sadd\sa\sline\sto\sc:\\winnt\\system32\\drivers\\etc\\hosts:\n\n0.0.0.0\s\s0.0.0.0
J foundin obsolete:\s8.3.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 24.\sChannel\sCommands
J title fconfigure\s-sockname\sperformance\sissue
J type Bug
K 478565ffffffffffffffffffffffffffffffffff
U nobody
Z dbf0a216e2554c0a551ea6406b232509