alex adewole

 /bizarre

_________ in vancouver.

about me

Passionate about open source, digital photography, and the intersection of technology and art. If programming is magic, then software engineers are wizards.

4 recently used languages

TypeScript
96.6%
Rust
2%
JavaScript
0.9%
CSS
0.5%

476 contributions in the last year

 
  • graphql
  • react
  • webrtc

📺 Share a browser with your friends.

Rust
  • 15
  • 1
 
  • database
  • mongodb
  • nosql
  • odm
  • orm

😷 Turn your structs into queryable models.

Rust
  • 7
  • 0
Return to home

bizarre/mcio

Open via Shipyard
  • Rust
  • 6
  • 1

A simple library that allows you to synchronously execute the Server List Ping (SLP) handshake and read the response.

README.md

mcio is a simple library for Rust that completes a Minecraft handshake and server list ping. It can be used to fetch a Minecraft server's:

  • Version (including name and protocol number)
  • Players
    • Max players
    • Online players
    • Online players sample
  • MOTD
  • Icon

As of right now, all calls to mcio are blocking.

Example Usage

fn main() {
    let response = mcio::ping("mc.hypixel.net", 25565, 315).expect("Failed to get response.");

    println!("Players: {}/{}", response.players.online, response.players.max);
    /* Players: 62075/85000 */
}