3 releases

0.1.2 Sep 13, 2023
0.1.1 Jan 23, 2023
0.1.0 Jan 23, 2023

#6 in #mezzenger

23 downloads per month
Used in mezzenger-udp

Apache-2.0

33KB
691 lines

mezzenger-utils

Utils for mezzenger.

https://crates.io/crates/mezzenger-utils

ko-fi

available utilities

Following utilities are available or staged for development:

  • Inspector - wrapper transport calling a callback whenever it sends or receives a message.
    Work in progress.

  • Split - split transport into two with different message types.
    Work in progress.

  • Merged - merge futures Stream and Sink into a mezzenger transport.
    Work in progress.

  • Numbered - wrapper transport attaching a number to messages.

  • LatestOnly - wrapper transport turning a numbered (but not necessarily ordered) transport into an ordered transport, discarding old messages (polling a transport for the next message will return the latest received message, ignoring messages received before).
    Potentially useful when user doesn't care about stale messages (for example multiplayer video games).

  • Reliable - wrapper turning unreliable transport into reliable one (by acknowledging and resending lost messages after timeout).
    Work in progress.

  • Ordered - wrapper turning unordered (not guaranteeing message order) but reliable transport into ordered (and deduplicating) one.
    Work in progress.

  • Unreliabler - wrapper turning a transport into unreliable (possibly losing messages) and/or unordered (sending messages not in order, possibly duplicating messages) one - useful for testing.
    Work in progress.

see also

mezzenger

Dependencies

~1–2MB
~39K SLoC