Files
usbip/examples
Jiajie Chen feaf21176f feat: defer interrupt IN URBs until data is available (issue #63)
The server used to answer every interrupt IN poll immediately, replying with an
empty buffer whenever the device had no data. Clients that poll aggressively
(e.g. usbip-win2) therefore receive a flood of empty completions.

Add an opt-in pending model: a UsbInterfaceHandler may expose a Notify through
the new pending_notify(); while a handler has no data, the matching interrupt IN
URB is kept pending and completed only once the handler signals the Notify.
USBIP_CMD_UNLINK now cancels a still-pending transfer, and pending tasks are
cleaned up when the connection closes.

UsbHidKeyboardHandler gains new_keyboard_with_pending() and press() to opt into
this behaviour, while new_keyboard() is unchanged. A new example
(examples/hid_keyboard_pending.rs) demonstrates the new API; the original
hid_keyboard example is preserved unchanged.
2026-09-03 19:42:53 +08:00
..
2024-10-26 09:35:32 +08:00
2024-10-26 09:35:32 +08:00
2023-08-24 16:20:46 +02:00