Coder Social home page Coder Social logo

rercon's Introduction

ReRCON

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

Async

Starting with v2, this library will be fully async. The non-async version will no longer be supported.

Example

One-off connection:
use rercon::Connection;

let mut connection = Connection::open("123.456.789.123:27020", "my_secret_password", None).await?;
let reply = connection.exec("hello").await?;
println!("Reply from server: {}", reply);
Automatically reconnecting connection:
use rercon::ReConnection;

let mut connection = ReConnection::open("123.456.789.123:27020", "my_secret_password", None).await?;
let reply = connection.exec("hello").await?;
println!("Reply from server: {}", reply);

rercon's People

Contributors

blm768 avatar ikkerens avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.