Skip to content

Library to retrieve information from teeworlds servers and related mods.

License

Notifications You must be signed in to change notification settings

edg-l/teestatus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teestatus

Crates.io Rust Docs

Request info about teeworlds servers.

Example

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:

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();

About

Library to retrieve information from teeworlds servers and related mods.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages