tcp.readStreamBytes
| Syntax |
tcp.readStreamBytes (stream, bytesToRead, timeOutSecs, adrBuffer)
|
| Params |
stream is a stream reference returned by tcp.openStream. bytesToRead is the total number of bytes that tcp.readStreamBytes will attempt to read from the connection. timeOutSecs is the number of seconds to wait for data to come in before giving up. adrBuffer is the address of a string to which the incoming data is appended.
|
| Action |
Reads waiting data from an open TCP/IP connection.
|
| Returns |
True.
|
| Examples | |
| Notes |
The data is read from the stream in chunks as it becomes available, appending to the string pointed to by adrBuffer. Data is only read from the stream as long as the string pointed to by adrBuffer is not at least bytesToRead characters long. If the string already is bytesToRead characters long (or longer) in the beginning, we don't attempt to read from the stream. A timeout error is generated if the connection is idle for more than timeOutSecs seconds. This verb is new in Frontier 6.1. It's faster and more thread-friendly than using tcp.readStream and tcp.statusStream in a loop.
|
| See also |
tcp.readStream
|