Register notification functions for file descriptor additions/removals.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static void SetPollfdNotifiers( MonoUsbSessionHandle sessionHandle, PollfdAddedDelegate addedDelegate, PollfdRemovedDelegate removedDelegate, IntPtr pUserData )
Public Shared Sub SetPollfdNotifiers ( _ sessionHandle As MonoUsbSessionHandle, _ addedDelegate As PollfdAddedDelegate, _ removedDelegate As PollfdRemovedDelegate, _ pUserData As IntPtr _ )
public: static void SetPollfdNotifiers( [InAttribute] MonoUsbSessionHandle^ sessionHandle, PollfdAddedDelegate^ addedDelegate, PollfdRemovedDelegate^ removedDelegate, IntPtr pUserData )
Parameters
- sessionHandle (MonoUsbSessionHandle)
- A valid MonoUsbSessionHandle.
- addedDelegate (PollfdAddedDelegate)
- Function delegate for addition notifications.
- removedDelegate (PollfdRemovedDelegate)
- Function delegate for removal notifications.
- pUserData (IntPtr)
- User data to be passed back to callbacks (useful for passing sessionHandle information).
Remarks
To remove notifiers, pass NULL values for the function pointers.
Note that file descriptors may have been added even before you register these notifiers (e.g. when a new MonoUsbSessionHandle is created).
Additionally, note that the removal notifier may be called during Exit(IntPtr) (e.g. when it is closing file descriptors that were opened and added to the poll set when a new MonoUsbSessionHandle was created). If you don't want this, remove the notifiers immediately before calling MonoUsbSessionHandle.Close().
Note:
Member documentation was originally generated using the Libusb-1.0 API documentation:
Polling and timing