msq-rs
Rust library implementation of the legacy Master Server Query Protocol.
Usage
Add this to your Cargo.toml:
[dependencies]
msq = "0.2"
If you want to get straight from the latest master branch:
[dependencies]
msq = { git = "https://github.com/nullsystem/msq-rs.git" }
To get started using msq, see the Quick Start section below and take a look at the documentation (stable).
Features
By default, both async MSQClient and non-async/blocking MSQClientBlock are included.
However, if you want to only include one or the other, you could do the following:
For non-async/MSQClientBlock only:
[dependencies]
msq = { version = "0.2", default-features = false, features = ["non-async"] }
For async/MSQClient only:
[dependencies]
msq = { version = "0.2", default-features = false, features = ["async"] }
Quick Start
use ;
use Result;
async
Blocking/Non-Async version
If you don't want to use async, then a blocking version is available. The methods functionalities and names should matches its async counterpart.
use ;
use Result;
API Changes
From v0.1.X to v0.2.X
- REMOVED:
msq::regionandmsq::filtermodules are no longer exposed. Just usemsq::Regionenum andmsq::Filterstruct directly. - REPLACED:
as_stringreplacesas_strinmsq::Filter - NEW:
single_querymethod inmsq::MSQClientandmsq::MSQClientBlockto do a single query in one function - NEW:
msq::MSQClientBlockfor a non-async version - NEW: Can now define features
asyncandnon-async. Both are enabled by default.
License
msq-rs is released under the MIT License
Dependencies
Misc
The following library goes well with this one:
- Source A2S Queries: a2s-rs