GEOS SDK TechDocs
|
|
1.3 Writing Data to a Stream
|
1.5 Shutting Down a Stream
StreamRead(), StreamReadByte()
To read data in a stream, call the routine
StreamRead()
. This routine takes six arguments:
GeodeHandle
of the stream driver.
StreamToken
of the stream.
StreamBlocker
enumerated type, as described in Blocking on Read or Write
.
StreamRead()
will write the number of bytes actually read to that integer.
If the requested amount of data was read successfully,
StreamRead()
will return zero and write the number of bytes read (i.e. the size of the data buffer passed) to the integer pointed to by the sixth argument. If it could not successfully read the requested amount of data, it will return one of the following
StreamError
values:
You may often want to read a single byte from the stream. There is a special routine to do this,
StreamReadByte()
. This routine takes four arguments:
GeodeHandle
of the stream driver.
StreamToken
of the stream.
StreamBlocker
enumerated type, as described in Blocking on Read or Write
.
If the byte is written successfully,
StreamReadByte()
will return zero. Otherwise, it will return one of the following error values:
GEOS SDK TechDocs
|
|
1.3 Writing Data to a Stream
|
1.5 Shutting Down a Stream