OpenCyphal / libudpard

A compact implementation of the Cyphal/UDP protocol in C for high-integrity real-time embedded systems
MIT License
10 stars 8 forks source link

Remove timed out sessions #41

Open pavel-kirienko opened 11 months ago

pavel-kirienko commented 11 months ago

That is possible, but then we will need to traverse all sessions periodically to find timed out transfers. This may be difficult to arrange in some time-sensitive applications.

Alternatively, we could keep a view of all sessions ordered by the last update time, and check that view every time the receive function is invoked, without having to extend the API. The default timeout could be some multiple of the transfer-ID timeout. This can be done after the "significant completion" is reached.

_Originally posted by @pavel-kirienko in https://github.com/OpenCyphal-Garage/libudpard/pull/38#discussion_r1267378423_