Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 67239e47ef860e3af5c3913dfabdf96483ca60df
Ticket: 219205ffffffffffffffffffffffffffffffffff
missing file events on server socket under Windows
User & Date: ashmael on 2001-03-21 04:35:58
Changes

  1. icomment:
    Logged In: YES 
    user_id=178287
    
    I've recently been investigating this problem again hoping 
    to find a fix for the problem and in doing so have found 
    the following information that may be useful:
    
    * It happens most often on Windows 95/98.  It seems to be 
    much more difficult to reproduce on Windows NT, according 
    to my colleague with an NT machine, but I can reproduce it 
    with no problem on 95/98.
    
    * If the socket is closed and reopened, with a new event 
    handler created, communication resumes for a time (in my 
    case this is UDP so there's no connection loss doing so).
    
    * Simply using Tcl_DeleteChannelHandler and then calling 
    Tcl_CreateChannelHandler again does NOT cause communication 
    to resume.
    
    * After an event is dropped, the socket remains in the 
    readable state (as indicated by a select() call directly on 
    the socket).  It seems as long as the socket remains in 
    this state no further "readable" events will occur. Once 
    the socket is read so that it is no longer in the readable, 
    however, new incoming data will usually trigger the event 
    handler and will continue until the next time an event is 
    dropped.
    
    * The behavior seems to be affected by whether or not the 
    application has focus.  In my case, I've got a small DLL 
    written specifically to reproduce the problem.  Two copies 
    of wish are run, loading the DLL in each, and one acts as a 
    client and the other a server sending UDP packets back and 
    forth between each other as fast as possible.  The instance 
    acting as the server, which sends a packet back only when a 
    packet is received, usually runs normally as long as it has 
    the focus.  But as soon as the client gets focus then 
    events start getting dropped left and right on Win 95/98.
    
    * Tcl 8.0.5 does not exhibit the problem but all versions 
    from 8.2.1 through 8.4a2 do.  8.1.x - 8.2 may also exhibit 
    the problem but as of yet I haven't confirmed due to a 
    crashing problem with 8.1 and this DLL.
    
    
  2. login: "ashmael"
  3. mimetype: "text/plain"
  4. username: "ashmael"