int32 DSWaitEndOfStream (Item msgItem, DSRequestMsgPtr reqMsg, DSStreamCBPtr streamCBPtr)
DSWaitEndOfStream() requests an end of stream message from the DataStreamer.
DSWaitEndOfStream() also needs to be called after an EOS message has been received if the application wishes to receive further notification. The EOS message gets replied to when DSStopStream() is called, so DSWaitEndOfStream() should be called before DSStartStream()
The value of reqMsg determines whether or not DSWaitEndOfStream() returns immediately or waits for the end of stream message. If reqMsg specifies a request message, DSWaitEndOfStream() requests an asynchronous notification that the DataStreamer has reached the end of the stream. If reqMsg is NULL, however, DSWaitEndOfStream() will not return until the DataStreamer has reached the end of the stream.
msgItem
reqMsg
DSRequestMsg message that is formatted and sent to the DataStreamer. A value of NULL forces creation of an internal DSRequestMsg message and synchronous operation.
streamCBPtr
reqMsg are set to the following values:
whatToDo
- kD
SOpWaitEndOfStream
 
kDSInvalidDSRequest
kDSNoReplyPortErr 
SendMsg() or WaitPort() failed
VALIDATE_REQUEST_CODE symbol is enabled).
See "Error Messages" in the 3DO Portfolio Reference Manual for a listing of error messages returned by SendMsg() and WaitPort().