aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2024-08-30 12:03:25 +1000
committerSteve Bennett <steveb@workware.net.au>2024-09-20 11:27:37 +1000
commit1273201def190161c3e39fbe42bbfea4d642d8a3 (patch)
tree8a61483939c99888e715530acc2a0278902ea516
parentf21d8efa354f8563bbf6f157d3ab9c783363075c (diff)
downloadjimtcl-master.zip
jimtcl-master.tar.gz
jimtcl-master.tar.bz2
docs: document aio buffering, readsize changesHEADmaster
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--jim_tcl.txt17
1 files changed, 13 insertions, 4 deletions
diff --git a/jim_tcl.txt b/jim_tcl.txt
index ca90508..5ea980a 100644
--- a/jim_tcl.txt
+++ b/jim_tcl.txt
@@ -54,7 +54,7 @@ RECENT CHANGES
--------------
Changes since 0.83
~~~~~~~~~~~~~~~~~~
-None
+1. `aio` - support for configurable read and write buffering
Changes between 0.82 and 0.83
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -4982,16 +4982,19 @@ aio
If +'-noclose'+ is given, the returned handle is not automatically
closed for child proceses. See `socket` for details.
-+$handle *buffering none|line|full*+::
++$handle *buffering none|line|full* ?size?+::
Sets the output buffering mode of the stream channel. +'none'+ means
that puts immediately writes output. +'line'+ means output (including
previously buffered output) is written if a newline is to be written.
+'full'+ means that data is written when the output buffer is full
- (currently approx 64KB). Note that line buffering will also write
+ (default 64KB). Size may be specified in full mode.
+ Note that line buffering will also write
once the output buffer limit is reached, even if there is no newline.
Channels usually begin in full buffering mode, unless they identify
as a tty channel, in which case line buffering is used, and `stderr`
- begins with no buffering. See also `aio puts` and `aio flush`.
+ begins with no buffering. Returns the current buffering mode (including
+ size in full mode - e.g. +'line'+ or +'full 65536+'.
+ See also `aio puts` and `aio flush`.
+$handle *close ?r(ead)|w(rite)? ?-nodelete?*+::
Closes the stream.
@@ -5079,6 +5082,12 @@ aio
expected number of bytes (including zero). Use `aio eof` to determine
if the end-of-file has been reached.
++$handle *readsize* ?size?'+::
+ Sets or returns the current size of the read buffer used
+ for read, gets and copyto.
+ Defaults to 256, but can be increased to improve performance
+ for large reads.
+
+$handle *recvfrom* 'maxlen ?addrvar?'+::
Receives a message from the datagram channel via recvfrom(2) and returns it.
At most +'maxlen'+ bytes are read. If +'addrvar'+ is specified, the sending address