Skip to content
Tcl Source Code History Of Ticket 1329568fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1329568fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1329568fffffffffffffffffffffffffffffffff

  1. Ticket change [356b186cdf] (rid 106922) by setok on 2005-10-18 15:54:04:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      What happens if I open a socket with the -async option and then 
      immediately start writing to the channel? The documentation 
      mentions what happens when reading (although only in terms of 
      [gets]). It does have information on how [flush] works, but if I write 
      a large amount of information, is it possible I might fill up some 
      buffer? What happens then?
      
    4. foundin initialized to: "obsolete: 8.4.11"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "setok"
    9. subsystem initialized to: "24. Channel Commands"
    10. title initialized to:
      [socket -async] and [puts]: Inadequate documentation?
      
    11. type initialized to: "Bug"
  2. Ticket change [8f359fbc29] (rid 120245) by andreas_kupries on 2006-03-15 04:55:55:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      The puts command queues data only until the condition set
      via  -buffering is met, and then invokes [flush] internally.
      At that point the description of [flush] takes over.
      
      By default it flushes when a -buffersize'd number of
      characters have accumulated. Or every line, or always.
      
      The best way of dealing with -async is to set a handler for
      writable events. It triggers when the connection is open, or
      has positively failed.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. priority changed to: "3 Low"
    5. username: "andreas_kupries"
  3. Ticket change [c5b65c117a] (rid 112047) by setok on 2006-03-15 05:04:37:

    1. icomment:
      Logged In: YES 
      user_id=137542
      
      Thank you for the response. However, this does not answer my question in all 
      totality. What if the write buffer is full but a connection has not yet been made? 
      This is not actually answered in the [flush] documentation either. Will an error 
      occur if an attempt is made to flush the buffer, but the connection of an -async 
      socket has not yet been completed? Or will the buffer be resized while we are 
      waiting to connect?
      
      
    2. login: "setok"
    3. mimetype: "text/plain"
    4. username: "setok"
  4. Ticket change [3dfc0465ee] (rid 121189) by andreas_kupries on 2006-03-16 05:30:13:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      How about writing a tcl script which tests this ? My guess
      is that you would get an error as there should be no
      open/valid file handle Tcl can actually write to.
      
      Regarding buffer resizing, the only way to change buffer
      sizes is via fconfigure. The system does no automatic changes.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  5. Ticket change [524be388bb] (rid 137233) by oehhar on 2014-03-11 07:42:58:

    1. assignee changed to: "max"
    2. closer changed to: "nobody"
    3. comment changed to:
      What happens if I open a socket with the -async option and then 
      immediately start writing to the channel? The documentation 
      mentions what happens when reading (although only in terms of 
      [gets]). It does have information on how [flush] works, but if I write 
      a large amount of information, is it possible I might fill up some 
      buffer? What happens then?
      
    4. icomment:
      In the current branch [bug-13d3af3ad5] this is addressed and works as follows:
      
      a) blocking socket
      
      set h [socket -async $host $port]
      ...
      puts $h $data
      
      With the puts, the socket is switched to syncroneous mode. If this succeeds, the puts succeeds, otherwise, the puts fails.
      
      b) non blocking but without event queue:
      set h [socket -async $host $port]
      fconfigure $h -blocking 0
      gets $h $data
      
      I don't know what happens with a puts, but with gets, each time the async connect is proceeded until connected and then it returns any received data.
      
      There are now tests for that...
      
    5. login: "oehhar"
    6. mimetype: "text/plain"
    7. severity changed to: "Minor"
    8. username: "oehhar"
  6. Ticket change [d89f277197] (rid 258295) by serhiy.storchaka on 2026-10-16 21:17:47:

    1. icomment:
      The documentation now covers this: socket.n says that a blocking flush waits for the connection and a non-blocking one buffers the data, and chan.n says that non-blocking puts buffers without limit.
      Testing this found a 9.0 regression, reported as [251f46655c].
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  7. Ticket change [c1f599f8ed] (rid 259951) by serhiy.storchaka on 2026-10-22 17:19:27:

    1. closedate changed to: "2461330.3873507986"
    2. closer changed to: "serhiy.storchaka"
    3. login: "serhiy.storchaka"