Expand description
A generic eventually-correct framework over unreliable connections, such as UDP.
This crate uses a struct called Connector that eventually guarantees that all persistent messages
arrive at the other end, or it will disconnect.
This crate differentiates between two message types:
- Confirmed: This is a message that is:
-
- Guaranteed to arrive at some point
-
- Not guaranteed to arrive in the correct order
- Unconfirmed: This is a message that is not guaranteed to arrive
Use cases can be:
- Sending player data does not always have to arrive, because the location is updated 10 times a second (unconfirmed)
- Login information should always arrive, but this can take a second (confirmed)
Structs§
- Connector
- The connector is used to handle handshakes and timeouts with a different, remote connector
Enums§
- Network
State - The state of the connector. This is based on when the last ping was send or received. Changing your ConnectorParam will greatly affect the results of
Connector.state(), returning this value.
Traits§
- Connector
Param - Settings that are set up for a Connector. This can be used to tweak your Connector at compile-time
- Socket
- A generic trait over a socket. This is automatically implemented for
UdpSocketbut can be implemented for your own connector as well.
Type Aliases§
- Result
- The result that is used in this type. It is a simple wrapper around
Result<T, failure::Error>