AsyncReadLineFrom (open)
Asynchronously read a line from any input device
Syntax
// Core function, no LOADLIB necessary
OBJECT FUNCTION AsyncReadLineFrom(INTEGER inputid, INTEGER maxnumbytes, BOOLEAN striplf)Parameters
INTEGER inputidInput device id
INTEGER maxnumbytes(Maximum) number of bytes to read - the function will read until this limit or EOL is reached. This function never reads more than 32768 (32kB) in one call
BOOLEAN striplfStrip the carriage returns or linefeed characters from the input
Return value
OBJECTA promise that resolves to the read data
Description
This function reads from any input device, eg. a diskfile or a socket. This function reads the specified number of bytes or until the end of line is encountered.