Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IEventQIO::postRead ( p6ICom pIoIface,
p6IIoBuffer pIoBuffer,
P6IOCONTEXT pIoContext 
)
pure virtual

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
SuccessP6R::eOkThe request was successfully posted. Be aware that the event can complete before returning from this method.
FailureP6R::eInvalidArgpIoIface, pIoBuffer, pIoContext was NULL, or teh socket represented by pIoIface has not been bound or is a listening socket.
P6R::eNotInitializedThe initialize() method has not been successfully called on the event queue's interface.
P6R::eNoInterfaceThe type of interface passed in pIoIface is not supported by the event queue.
P6R::eNoAssocThe type of interface passed in pIoIface is not supported by the event queue.
P6R::eTooSmallThe 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