msgappend
msgappend ?-cvtnull char? msgId data
This command appends the specified data to msgId
. If the -cvtnull
option is
used, then every instance of char
is converted to a
null character before the data is appended to the message.
This command returns an empty string.
msgappread ?-stats statsVar? len10 msgId fileId
msgappread ?-stats statsVar? nl msgId fileId
msgappread ?-stats statsVar? raw msgId fileId len
This command reads the next message from fileId
, an open file handle. It then appends the data to msgId
.
If a len10
or nl
read is specified, then the appropriate message boundary is used to
terminate the read.
Supply a read length, len
, for
raw
reads.
If a statsVar
variable name is supplied, then
the variable is set to contain a list of two values: todo
done
.
-
todo
is the number of bytes requested. This is the length implied by a len10 record header: 0 fornl
reads, or thelen
value forraw
reads. -
done
is the actual number of characters read.
These values can be useful when a read fails.
This command returns the number of bytes read.