You might have understood from my previous post today that I am slowly moving to IPv6, so I am trying to run the code under 8.6. Basically, what I have problem with is that the code runs perfectly on Linux, but blocks on Windows. I have been able to track it down to the procedure being bound to "accept", i.e. to be run when a client connects, is never called on Windows. Every access to the server timeouts for reasons that I cannot explain. Since the code has moved from versions to versions of Tcl (actually, since 8.2 if I remember it right), it is event based and does not make use of the new stuff from 8.6.
I don't really know where to start. I have tried with all firewalls turned off and on two different Windows (7, 32bits Tcl on 64bits OS) installations. Any ideas?
> I don't really know where to start. I have tried with all firewalls turned off and on two different Windows (7, 32bits Tcl on 64bits OS) installations. Any ideas?
No concrete idea, but (possibly obvious to you, sorry in that case)
general advice:
Have you tried to throw a network monitor (running on the Windows box)
at that (Wireshark is a good choice)? Can you see the SYN coming in? The
SYN ACK going out? Etc.
There must be some sort of system call monitor for Windows (ŕ la
strace). This might help to further narrow the search space.
You are right, I will try to have a look with wireshark. I wish I could shrink this to an example that I can share on the group, but it is a whole lot of code... I will keep you all posted. Thanks.
Check out this page (replace java with Tcl) and this is the problem I was having:
http://stackoverflow.com/questions/3375435/avoid-windows-firewall-pop... Following the advice of the answer, I popped open tkcon (8.6.0.0 beta-7) and found the following results in accept being properly called:
proc accept {c a p} {puts "accept $c $a $p"}
set server_socket [socket -myaddr 127.0.0.1 -server accept 9900]
set client_socket [socket localhost 9900]
and the following does not:
proc accept {c a p} {puts "accept $c $a $p"}
set server_socket [socket -server accept 9900]
set client_socket [socket localhost 9900]
I installed the Windows (x86) on both a 32-bit XP box and a 64-bit Windows 7 box
I installed the Windows (64-bit, x64) on the Windows 7 box
The accept proc is called whether or not -myaddr is specified in the socket command - fixed!
Also, time {socket localhost 9900} was indicating that it was taking ~1 SECOND to connect in 8.6.0.0b7. This is back down to the ~1 ms range in 8.6.0.0b8
Aside: Now I need to find or open a bug against tkcon - up arrow no longer cycles through command history in 8.6.0.0b8