Developer

API Reference

ISOCKET_Readable()

Brew Release
Brew MP 1.0.2
See Also
Description
This function allows an application to register a callback function to be invoked by the AEE when a non-blocking read operation (Accept, Read, ReadV, or RecvFrom) on the specified socket makes progress. Progress can involve returning data, returning an error code, or returning 0 (zero) to indicate a closed connection—anything but AEE_NET_WOULDBLOCK. This function is typically be used after a previous read attempt returned AEE_NET_WOULDBLOCK, but it can be used even if no read function has been called.
NOTE: There is no absolute guarantee that the read function makes progress after the callback. The caller must be prepared to call ISOCKET_Readable() again when the read function return AEE_NET_WOULDBLOCK.
Parameters
  • pISocket
    []:
    Pointer to the ISocket Interface object.
  • pfn
    []:
    Address of the callback function. This function is invoked by AEE when the socket becomes ready to be read or when it is ready to be closed. If this is NULL, it cancels the Readable callback function registered by a previous call to ISOCKET_Readable (if any).
  • pUser
    []:
    User-defined data that is passed to the callback function when it is invoked.
Interface
ISOCKET
Prototype
    void ISOCKET_Readable(ISocket * pISocket, PFNNOTIFY pfn, void * pUser)
Return
None.
Side Effect
None.
Comment
The registered callback can be cancelled (un-registered) with ISOCKET_Cancel().
  • Follow