msginsread
This reads the next message from fileId
, an open file handle. Then, it inserts the data into msgId at offset of 0,
or offset, if specified.
msginsread ?-stats statsVar? len10 msgId fileId ?offset?
msginsread ?-stats statsVar? nl msgId fileId ?offset?
msginsread ?-stats statsVar? raw msgId fileId len ?offset?
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 if a read fails.
This command returns the number of bytes read.