Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edg-l/teestatus
Library to retrieve information from teeworlds servers and related mods.
https://github.com/edg-l/teestatus
ddnet ddracenetwork rust-lang server-info teeworlds
Last synced: 23 days ago
JSON representation
Library to retrieve information from teeworlds servers and related mods.
- Host: GitHub
- URL: https://github.com/edg-l/teestatus
- Owner: edg-l
- License: mit
- Created: 2021-01-24T17:36:16.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-24T13:38:25.000Z (over 3 years ago)
- Last Synced: 2024-10-06T01:13:07.119Z (about 1 month ago)
- Topics: ddnet, ddracenetwork, rust-lang, server-info, teeworlds
- Language: Rust
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# teestatus
[![Crates.io](https://meritbadge.herokuapp.com/teestatus)](https://crates.io/crates/teestatus)
![Rust](https://github.com/edg-l/teestatus/workflows/Rust/badge.svg)
[![Docs](https://docs.rs/teestatus/badge.svg)](https://docs.rs/teestatus)Request info about teeworlds servers.
Example
```rust,no_run
use teestatus::*;
use std::net::UdpSocket;fn main() {
env_logger::init();
let sock = UdpSocket::bind("0.0.0.0:0").expect("can't bind socket");
sock.connect("0.0.0.0:8303")
.expect("can't connect socket");
println!("info: {:#?}", ServerInfo::new(&sock).unwrap());
}
```Example to fetch servers from a master server:
```rust,no_run
let master = MasterServer {
hostname: Cow::Borrowed("49.12.97.180"),
port: 8300,
};
let sock = UdpSocket::bind("0.0.0.0:0").expect("can't bind socket");
let servers = master.get_server_list(&sock).unwrap();
```