OpenSpeech Browser

Getting Started
Architecture Description
Integration Guide

Copyright (c) 1998-2001 SpeechWorks International, Inc. All Rights Reserved.

VXIinetResult Read

(struct VXIinetInterface* pThis,
  VXIbyte* buffer,
  VXIulong buflen,
  VXIulong* nread,
  VXIinetStream* stream)

Read from a stream
This may or not block, as determined by the flags used when opening the stream. When in non-blocking mode, partial buffers may be returned instead of blocking, or an VXIinet_RESULT_WOULD_BLOCK error is returned if no data is available at all.

NOTE: VXIinet_RESULT_END_OF_STREAM may be returned even when nread is greater then 0. Example: if there are 20 more bytes remaining in a stream and the client component requests 50 bytes via Read( ), the implementation should return VXIinet_RESULT_END_OF_STREAM with nread = 20. If the client component then (incorrectly) requests 50 more bytes via Read( ), return VXIinet_RESULT_END_OF_STREAM again with nread = 0.

buffer - [OUT] Buffer that will receive data from the stream
buflen - [IN] Length of buffer, in bytes
nread - [OUT] Number of bytes actual read, may be less then buflen if the end of the stream was found, or if using non-blocking I/O and there is currently no more data available to read
stream - [IN] Handle to the stream to read from
VXIinet_RESULT_SUCCESS on success

Alphabetic index Hierarchy of classes

This page was generated with the help of DOC++.