You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is basically SANS-IO except for calls to Instant::now. I was wondering what the appetite is for changing that?
APIs like encapsulate and decapsulate should likely take an now: Instant parameter to accurately reflect timestamps of last received packets.
update_timers should also take a now: Instant parameter.
update_timers can save the provided now timestamp as local state and all other functions can compute durations etc based on that timestamp. Thus, accuracy of that depends entirely on the user in how often they call update_timers.
We might want to consider renaming update_timers to something like handle_timeout or update_now.
The text was updated successfully, but these errors were encountered:
thomaseizinger
changed the title
Appetite for refactoring to be sans-io (including time?)
Appetite for refactoring to be SANS-IO (including time?)
Jan 24, 2024
This library is basically SANS-IO except for calls to
Instant::now
. I was wondering what the appetite is for changing that?encapsulate
anddecapsulate
should likely take annow: Instant
parameter to accurately reflect timestamps of last received packets.update_timers
should also take anow: Instant
parameter.update_timers
can save the providednow
timestamp as local state and all other functions can compute durations etc based on that timestamp. Thus, accuracy of that depends entirely on the user in how often they callupdate_timers
.We might want to consider renaming
update_timers
to something likehandle_timeout
orupdate_now
.The text was updated successfully, but these errors were encountered: