GEOS SDK TechDocs
|
|
1.2 Blocking on Read or Write
|
1.4 Reading Data from a Stream
StreamWrite(), StreamWriteByte()
To write data into a stream, call the routine
StreamWrite()
. 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
.
StreamWrite()
will write the number of bytes actually copied to that integer.
If all the data was written successfully,
StreamWrite()
will return zero and write the number of bytes written (i.e. the size of the data buffer passed) to the integer pointed to by the sixth argument. If it could not successfully write all the data, it will return one of the following
StreamError
values:
You may often want to write a single byte to the stream. There is a special routine to do this,
StreamWriteByte()
. 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,
StreamWriteByte()
will return zero. Otherwise, it will return one of the following error values:
GEOS SDK TechDocs
|
|
1.2 Blocking on Read or Write
|
1.4 Reading Data from a Stream