Crate rercon

Source
Expand description

ReRCON is a RCON library written with primarily the game Ark: Survival Evolved in mind. While this library is Valve RCON compliant, and should thus work with other RCON applications, it has not been tested for other applications.

There are two primary types to be used with this create, Connection and ReConnection, both of these types share the same API, the primary difference is that ReConnection::exec will never return IO errors, as it will start a new thread to reconnect, instead, it will return error BusyReconnecting, with a string being a to_string representation of the error that caused the reconnect in the first place.

All public methods use a template to accept all forms of strings that implement Into<String>, however the library will always return std::string::String

Structs§

  • Represents a single-established RCON connection to the server, which will not automatically reconnect once the connection has failed. This struct will instead opt to return IO errors, leaving connection responsibility in the callers hands.
  • Drop-in replacement wrapper of Connection which intercepts all IO errors returned by Connection::exec to start the reconnection thread, and will opt to return BusyReconnecting instead.
  • Settings struct which can be used to adapt behaviour slightly which might help with nonconformant servers.

Enums§

  • A common error enum that is returned by all public functions describing different forms of failures that can occur within this library.