Use this method to request that an asynchronous read operation be performed on the specified I/O interface.
When the operation completes, an event will be posted to the event queue and can be retrieved by calling the queues getNextEvent() method.
- Parameters
-
pIoIface | [ in ] A pointer to the I/O interface to perform the read operation on. This interface must have already been associted with the event queue by successfully calling the associate() method. |
pIoBuffer | [ in ] A pointer to a p6IIoBuffer to place the read data into. If the buffer currently contains data, it will not be overwritten. The read will be limited to the available buffer space. |
pIoContext | [ in ] A pointer to a properly initialized P6IOCONTEXT which will be used for this I/O operation. Any unused members of this structure should always be initialized to zero before the structure is passed into this method. Othwise the method may file with an error return of eInvalidArg. The m_cTransfer member can be set to the number of bytes to read, or zero to automatically use the available space in the buffer passed in the pIoBuffer argument. If m_cTransfer is greater than zero, it must be less than or equal to the available buffer space in the provided buffer. |
- Returns
Success | P6R::eOk | The request was successfully posted. Be aware that the event can complete before returning from this method. |
Failure | P6R::eInvalidArg | pIoIface, pIoBuffer, pIoContext was NULL, or teh socket represented by pIoIface has not been bound or is a listening socket. |
P6R::eNotInitialized | The initialize() method has not been successfully called on the event queue's interface. |
P6R::eNoInterface | The type of interface passed in pIoIface is not supported by the event queue. |
P6R::eNoAssoc | The type of interface passed in pIoIface is not supported by the event queue. |
P6R::eTooSmall | The available buffer space (bufsize-used) was less than the value passed in m_cTransfer. |
- See Also
- P6R::p6ITcpSocket, P6R::p6IUdpSocket, P6R::p6IUnbufferedFile, P6R::p6IIoBuffer, P6R::P6IOCONTEXT