Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1b997e30ecfdbdab44e1f143c134ccfc792f87e9
Ticket: 794839ffffffffffffffffffffffffffffffffff
async sockets: readable vs writable fileevents
User & Date: ralfixx on 2003-08-25 18:43:18
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    Try to async-connect to a host/port which refuses the
    connection:
    
        proc foo {fd} {
          puts "$fd: errstat [fconfigure -error $fd]"
          close $fd
        }
    
        # chose any port which is not open on local machine
        set port_not_open 65432
        set fd [socket -async localhost $port_not_open]
    
    Now we need some means to get informed when the
    conection is
    available, the manpage tells use to use fileevent.
    
    I find that on IRIX both readable and writable
    fileevents work to
    detect the failed connection:
    
      fileevent $fd readable [list foo $fd]
      fileevent $fd writable [list foo $fd]
    
    both immediately show the failed connection.
    
    However on Windows, only the `writable' fileevent
    triggers, the
    `readable' just hangs around forever.  The same goes
    for connection
    timeouts (host offline): readable fileevents do not
    time out,
    `writables' do.
    
    David Gravereaux said: "... I agree this is a problem.
    Please post this bug to the sourceforge bug db."
    
    So here we are...
    
    
  4. foundin changed to: "obsolete: 8.3.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "ralfixx"
  9. subsystem changed to: "04. Async Events"
  10. title changed to: "async sockets: readable vs writable fileevents"
  11. type changed to: "Bug"