Overview
| Artifact ID: | 524be388bbc07ddde6144dd2038f037fee87d7c1 |
|---|---|
| Ticket: | 1329568fffffffffffffffffffffffffffffffff
[socket -async] and [puts]: Inadequate documentation? |
| User & Date: | oehhar on 2014-03-11 07:42:58 |
Changes
- assignee changed to: "max"
- closer changed to: "nobody"
- 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?
- 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...
- login: "oehhar"
- mimetype: "text/plain"
- severity changed to: "Minor"
- username: "oehhar"