For a datagram socket, ISOCKET_SendTo() can be used on multiple interfaces (e.g. BREW Loopback and PPP) for the same socket. In this case, ISOCKET_Writeable() is tied to the previous call to ISOCKET_SendTo(). If ISOCKET_SendTo() has never been called, ISOCKET_Writeable() is tied to all available interfaces.
NOTE: There is no absolute guarantee that the write function makes progress after the callback, so the caller must always be prepared to call ISOCKET_Writeable() again when the write function returns AEE_NET_WOULDBLOCK.
- pISocket:Pointer to the ISocket Interface object for which the callback function needs to be registered.
- pfn:Address of the callback function. This function is invoked by AEE when the socket becomes ready to receive data or when it is ready to be closed. If this is NULL, it cancels the Writeable callback function registered by a previous call to ISOCKET_Writeable().
- pUser:User-defined data that is passed to the callback function when it is invoked.
void ISOCKET_Writeable(ISocket * pISocket, PFNNOTIFY pfn, void * pUser)
Non-blocking write operation include: