#include <cafe.h>
#include <cafe/hio.h>

HIOStatus HIOReadAsyncEx(HIOHandle       handle, 
                         u32             sizeInBytes, 
                         void           *pData,
                         HIOAsyncStruct *asyncStruct);


handle Handle of the channel from which to read.
sizeInBytes Number of bytes to read.
pData Pointer to the destination of the data read.
asyncStruct This parameter contains the callback function that should be called when the read completes or an error occurs.

Return Values

HIO_STATUS_OK Successfully submitted the asynchronous read request.
HIO_STATUS_NO_CLIENT_TXN_BUF_AVAILABLE The asynchronous read request could not be submitted. Retry the request as the condition is temporary.
< 0 The asynchronous read request failed to be submitted.


Invokes a read from the specified channel and returns immediately. Upon completion, the specified callback asyncParam is invoked.

The asyncStruct parameter contains a pointer to the application callback function as well as to the OSMessageQueue to use for communication internal to the HostIO API.

The callback specified by asyncStruct will not receive status notifications indicating that the connection has ended. Only the callbacks for HIOOpen or HIOOpenEx will receive the HIO_STATUS_NO_CONNECTIONS status code.

Do Not Call From

Callbacks Do not call this function from any callback function.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.
Production code Do not call this function in production code. It is available only for debugging purposes.

See Also


Revision History

2013/05/08 Automated cleanup pass.
2011/12/06 Added note regarding callback status code.
2011/11/04 Updated return values.
2011/02/21 Initial version.