Skip to content
Tcl Source Code Artifact [a7268c5f7e]
Login

Artifact [a7268c5f7e]

Artifact a7268c5f7ec719bc00b67ddb46c0c70df75c6c10:

Ticket change [a7268c5f7e] - New ticket [219298ffffffffff|219298ffff] <i>socket -async behaves differently on Win95 and NT</i>. by nobody on 2000-10-26 05:10:20.
D 2000-10-26T05:10:20
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s2634\sBug\nVersion:\s8.2\nSubmitDate:\s'1999-08-31'\nLastModified:\s'2000-04-14'\nSeverity:\sLOW\nStatus:\sUnAssn\nSubmitter:\stechsupp\nChangedBy:\shobbs\nRelatedBugIDs:\s1776\nOS:\sWindows\sNT\nMachine:\sX86\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-10-25'\n\n\nName:\nWaidelich\n\nComments:\nwinsock\sreports\sthe\sfailed\sclose\scorrectly.\sonly\sa\speer\s'shutdown'\sis\n\s\s\s\snot\sreported\scorrectly.\n\s\s\s\s\n\s\s\s\sI\swant\sTcl\sto\sbecome\scleaner\severy\srelease.\sWorkarounds\sare\sa\sreal\spain.\n\nReproducibleScript:\n#\sSOCKET\sBUG\s(Win95\sand\sNT?)\sis\sportability\sproblem\n\s\s\s\s#\s=================================================\n\s\s\s\s#\schecked\swith\sTcl\s8.0.3,\s8.0.4,\s8.1.0\sand\s8.2.0\n\s\s\s\s#\sreported\sto\sScriptics\swhen\s8.0.3\swas\sreleased\n\s\s\s\s#\n\s\s\s\s#\stest-script\sfollows\n\s\s\s\s#\n\s\s\s\s#\sconnect\sto\snon-existent\sport\sfails\swithout\serror\sreport\n\s\s\s\s#\sfconfigure\s-error\sdoes\snot\swork\son\sWin95\sand\sonly\shalf\son\sWinNT\s(no\n\s\s\s\sposix)\n\s\s\s\s#\sthere\sis\sa\sworkaround\s(fconfigure\s-peername)\n\s\s\s\s#\n\s\s\s\s#\n\s\s\s\s!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\s\s\s\s#\sQUESTION:\sshouldn't\sa\sfailed\sconnect\sbe\sreported\sby\sa\sREADable\n\s\s\s\ssocket?\n\s\s\s\s#\sI\sthink\sthis\sis\show\sit\sworked\swith\sC\son\sSCO-UNIX.\sthe\sread\scan\sthen\n\s\s\s\s#\sreports\sthe\serror.\sA\sWRITEable\ssocket\sdoes\snot\smean\n\s\s\s\s#\swe\shave\sdata\sto\ssend.\sSo\sno\ssystem\scall,\sno\serror\sreport...\n\s\s\s\s#\n\s\s\s\s\n\s\s\s\swm\sgeometry\s.\s+300+10\n\s\s\s\s\n\s\s\s\stext\s.t\s-yscrollcommand\s".s\sset"\s-bg\syellow\s-width\s60\s-height\s25\n\s\s\s\sscrollbar\s.s\s\s-command\s".t\syview"\n\s\s\s\s\n\s\s\s\spack\s.s\s-side\sright\s-fill\sy\n\s\s\s\spack\s.t\s-fill\sboth\s-expand\syes\n\s\s\s\s\n\s\s\s\sproc\sdebug\s\st\s{\n\s\s\s\s.t\sinsert\send\s"$t\\n"\n\s\s\s\s.t\ssee\send\n\s\s\s\supdate\sidletasks\n\s\s\s\s}\n\s\s\s\s\n\s\s\s\sproc\srrr\ssock\s{\n\s\s\s\sdebug\s"$sock\sreadable"\n\s\s\s\scatch\s{read\s$sock}\sx\n\s\s\s\sglobal\serrorCode\n\s\s\s\sdebug\s"read\s<$x>\serrno=$errorCode"\n\s\s\s\s}\n\s\s\s\s\n\s\s\s\sproc\swww\ssock\s{\n\s\s\s\sdebug\s"$sock\swritable"\n\s\s\s\sglobal\serrorCode\n\s\s\s\s#\sfrom\sthe\smanual:\s...determine\sif\san\sasynchronous\sconnect\soperation\n\s\s\s\ssucceeded.\n\s\s\s\s#\sI\sexpected\sto\sget\sECONNREFUSED\s(winsock\s10061)\n\s\s\s\s#\sbut\sgot\snothing\n\s\s\s\scatch\s{fconfigure\s$sock\s-error}\sr\n\s\s\s\sdebug\s"-error\s<$r>\s<$errorCode>"\n\s\s\s\s#\sA\sworkaround\sgives\sENOTCONN\s-->\sI\scoude\sfake\sa\sECONNREFUSED\sto\suser\n\s\s\s\scatch\s{fconfigure\s$sock\s-peername}\sr\n\s\s\s\s\s\s\s\s\s\s\s\sdebug\s"-peername\s<$r>\s<$errorCode>"\n\s\s\s\s#\n\s\s\s\sfileevent\s$sock\swritable\s{}\s;#\sdon't\sloop\n\s\s\s\s#\n\s\s\s\scatch\s{close\s$sock}\sr\n\s\s\s\sdebug\s"close\s<$r>\s<$errorCode>"\n\s\s\s\s}\n\s\s\s\s\n\s\s\s\sproc\sccc\s{}\s{\n\s\s\s\sdebug\s"connecting\sto\slocalhost:6666\s(change\sif\sexists!)"\n\s\s\s\sset\ssock\s[socket\s-async\slocalhost\s6666]\n\s\s\s\sdebug\s"$sock\sopened"\n\s\s\s\sfconfigure\s$sock\s-blocking\sno\n\s\s\s\sfileevent\s$sock\sreadable\s"rrr\s$sock"\n\s\s\s\sfileevent\s$sock\swritable\s"www\s$sock"\s;#\swriteable\son\sconnect!\n\s\s\s\sdebug\s"waiting\sfor\sfileevents..."\n\s\s\s\s}\n\s\s\s\s\n\s\s\s\sccc\s;#\sconnect\snow\n\s\s\s\s\n\s\s\s\s#from\sthe\slog:\n\s\s\s\s#==============\n\s\s\s\s#\sconnecting\sto\slocalhost:6666\s(change\sif\sexists!)\n\s\s\s\s#\ssock14\sopened\n\s\s\s\s#\swaiting\sfor\sfileevents...\n\s\s\s\s#\ssock14\swritable\n\s\s\s\s#\s95:\s-error\s<>\s<>\n\s\s\s\s#\sNT:\s-error\s<connection\srefused>\s<>\s\s\s\s\s...\sno\sPOSIX\sin\serrno\n\s\s\s\s#\n\s\s\s\s#\s-peername\s<can't\sget\speername:\ssocket\sis\snot\sconnected>\s<POSIX\n\s\s\s\sENOTCONN\s{socket\sis\snot\sconnected}>\n\s\s\s\s#\sclose\s<>\s<POSIX\sENOTCONN\s{socket\sis\snot\sconnected}>\n\nObservedBehavior:\nasync\sconnect\sgets\sreported\sdifferently\son\sWin95\sand\sNT\n\s\s\s\s\n\s\s\s\salthough\sthere\sis\sa\sworkaround,\sit\sshould\sbe\sdone\show\sit\swas\n\s\s\s\sintended\sby\sthe\ssocket-abstraction\n\nDesiredBehavior:\non\sfailed\sasync\sconnect\sI\sexpect\sthe\ssocket\sto\sbecome\sreadable\s(and\n\s\s\s\smaybe\swriteable\stoo?)\n\s\s\s\s\n\s\s\s\son\ssuccess\sI\sexpect\sit\sto\sbecome\swriteable.\sAnd\sreadable\sonly\sif\sdata\sis\n\s\s\s\savailable.\n\n\n\n
J foundin obsolete:\s8.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 63.\s(unused)
J title socket\s-async\sbehaves\sdifferently\son\sWin95\sand\sNT
J type Bug
K 219298ffffffffffffffffffffffffffffffffff
U nobody
Z 02fe9c105e6b8ee98733bb9bc2f8722a