msgappread
This reads the next message from fileId
, an open file handle, and appends the data to msgId
.
msgappread ?-stats statsVar? len10 msgId fileId
msgappread ?-stats statsVar? nl msgId fileId
msgappread ?-stats statsVar? raw msgId fileId len
If you specify a len10 or nl read, then use the appropriate message boundary to terminate the read. Supply a read length, len, for raw reads.
If you supply a statsVar variable name, 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 for nl reads, or the len value for raw reads.done
is the actual number of characters read. These values are useful when a read fails.
This command returns the number of bytes read.