Artifacts Associated With Ticket 219023
Ticket change [a27c33ab7d] (rid 109904) by nobody on 2000-10-26 01:09:34:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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 - foundin initialized to: "final: 8.0.5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "63. (unused)"
- title initialized to: "Need nonblocking-while-creating sockets"
- type initialized to: "Bug"
Ticket change [74bb6ac762] (rid 105258) by welch on 2000-10-26 08:33:10:
- closedate changed to: "2000-10-26T01:33:10"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [5633cdc651] (rid 94278) by dgp on 2001-04-01 01:47:33:
- closedate changed to: "2001-03-31T18:47:33"
- closer changed to: "dgp"
- subsystem changed to: "27. Channel Types"