Skip to main content

Module utils

Module utils 

Source

Enumsยง

SurbNotificationMode ๐Ÿ”’
Indicates whether the keep-alive stream should notify the Session counterparty about the SURB target (Entry) or SURB level (Exit).

Functionsยง

insert_into_next_slot ๐Ÿ”’
This function will use the given generator to generate an initial seeding key. It will check whether the given cache already contains a value for that key, and if not, calls the generator (with the previous value) to generate a new seeding key and retry. The function either finds a suitable free slot, inserting value generated by value_fn and returns the found key, or terminates with None when gen returns the initial seed again.
spawn_keep_alive_stream ๐Ÿ”’
Spawns a task for a rate-limited stream of Keep-Alive messages to the Session counterparty.
transfer_session
Convenience function to copy data in both directions between a Session and arbitrary async IO stream. This function is only available with Tokio and will panic with other runtimes.