Skip to content
/ vsq Public
forked from FssAy/vsq

Library used to discover and query Rust game servers

Notifications You must be signed in to change notification settings

VulcoLibs/vsq

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VSQ

Library to discover and query Rust game servers.

Examples

Querying a know Rust server to receive the info:

fn main() {
    let sq = ServerQuery::new(SocketAddr::new(
        IpAddr::from([192, 168, 18, 8]),
        28016,
    )).await.unwrap();

    let res = sq.a2s_info().await.unwrap();
}

Querying the Master Server for server list:

fn main() {
    let mq = MasterQuery::new().await;

    let (tx, mut rx) = tokio::sync::mpsc::channel(12);

    let vsq_task = mq.start("hl2master.steampowered.com", 27011, Filters {
        app_id: 252490,
        no_password: true,
    }, tx.clone()).await.unwrap();

    while let Some(addr) = rx.recv().await {
        println!("{}", addr);
    }
}

About

Library used to discover and query Rust game servers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%