Skip to content
Tcl Source Code History Of Ticket 219023ffffffffff
Login

History Of Ticket 219023ffffffffff

Artifacts Associated With Ticket 219023ffffffffff

  1. Ticket change [a27c33ab7d] (rid 109904) by nobody on 2000-10-26 01:09:34:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 4000 RFE
      Version: 8.0.5
      SubmitDate: '2000-01-10'
      LastModified: '2000-01-10'
      Severity: LOW
      Status: Released
      Submitter: techsupp
      ChangedBy: hobbs
      OS: Windows 95
      FixedDate: '2000-01-10'
      FixedInVersion: 8.2
      ClosedDate: '2000-10-25'
      
      
      Name:
      Kerem HADIMLI
      
      Extensions:
      Pure Tcl 8.0.5 with no extensions
      
      DesiredBehavior:
      Any way to create sockets that are like -async switch (socket creation/connection doesn't block), but understand whether if the socket can connect or not?
      Because I have to use blocking-while-connecting sockets (which are BAD), to understand if the socket can connect or not.
      
      thanks,
      Kerem 'Waster_' HADIMLI
      
      
      
      Note from the newsgroup:
      
      It IS possible to check the connection status of an asynchronous
      socket:
      
           set sock [socket -async $host $port]
           fileevent $sock readable "getConnectState $sock"
           fileevent $sock writable "getConnectState $sock"
      
           proc getConnectState {sock} {
               fileevent $sock readable ""
               fileevent $sock writable ""
      
               set connectState [fconfigure $sock -error]
               if {[string compare $connectState ""] == 0} {
                   puts "connected to server"
               } else {
                   close $sock
                   puts "connection failed"
               }
           }
      
      This solution works well on UNIX.  On Windows it works with Tcl 8.2 or
      higher, because the fileevent command was not implemented properly in
      earlier versions of Tcl under Windows.  You should upgrade to Tcl 8.2.3
      (or 8.3b1).
      
      --
      Csaba Nemethi   http://www.nemethi.de   mailto:[email protected]
       
      -- 01/10/2000 hobbs
      
    4. foundin initialized to: "final: 8.0.5"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "63. (unused)"
    10. title initialized to: "Need nonblocking-while-creating sockets"
    11. type initialized to: "Bug"
  2. Ticket change [74bb6ac762] (rid 105258) by welch on 2000-10-26 08:33:10:

    1. closedate changed to: "2000-10-26T01:33:10"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [5633cdc651] (rid 94278) by dgp on 2001-04-01 01:47:33:

    1. closedate changed to: "2001-03-31T18:47:33"
    2. closer changed to: "dgp"
    3. subsystem changed to: "27. Channel Types"