rust-gamedig/examples
Tom c3281be419
[Protocol] Retry failed requests (#95)
* Add retry count to TimeoutSettings

This can be used to specify how many times to re-send requests that
fail. The default value is "1" so the if the first request fails, 1 more
attempt will be made.

* Add retries to valve queries

* [Protocol] &Optional<TimeoutSettings> add get_retries_or_default

Allow fetching the number of retries or the default retries value from a
borrowed optional TimeoutSettings.

* [Protocol] Add retries to minecraft protocol

* [Protocol] Add retries to quake

* [Protocol] Add retries to gamespy

* [Protocol] Update TimeoutSettings docs, and change default retries to 0

* Remove logging from retry_on_timeout

* [Protocol] TimeoutSettings make retries non-optional

* [Protocol] Move retry logic into lower level query functions

Retries are now implemented as wrappers on the single function that
would need to be retried on timeout.

In order to avoid cloning of TimeoutSettings, Socket::apply_timeouts()
was changed to accept a borrowed TimeoutSettings. And extra helpers were
added to the TimeoutSettings impl to reduce repetition.

* [Examples] Add retries to the generic example

* Also retry on PacketSend error

Sending packets could also timeout and until error_generic_member_access
is stable we have no way of determining the type of the underlying
`std::error::Error`.

* Add retry unit tests

* [Docs] Update changelog
2023-09-25 22:12:54 +03:00
..
generic.rs [Protocol] Retry failed requests (#95) 2023-09-25 22:12:54 +03:00
master_querant.rs [Games] Update game definitions to match node-gamedig names (#100) 2023-09-23 00:20:01 +03:00
minecraft.rs [Protocol] Fix Minecraft Java query not being able to specify a hostname (#91) 2023-09-01 22:21:08 +03:00
tf2.rs [Crate] Enforce formatting in CI (#46) 2023-06-10 18:15:12 +03:00
valve_master_server_query.rs [Service] Fix tests 2023-05-08 15:34:59 +03:00