Giter VIP home page Giter VIP logo

ratd's Introduction

Rust Avara Tracker Daemon

aka RAT daemon aka Ratt Damon

ratd's People

Contributors

rherriman avatar

Watchers

James Cloos avatar  avatar

ratd's Issues

Replace parse/serialize code for u32 and u16 types with newly stabilized `from_be_bytes`/`to_be_bytes`

I was already pretty sure the existing code wouldn't work on big endian architectures, since I later learned the << and >> operators are meant to be consistent. Better to use the std lib when I can, anyway. I'd wanted to use them from the beginning, but stubbornly refused to do so until they were stabilized. Finally, they were stabilized in 1.32.

I'll have to convert the array slices to actual arrays before passing to from_be_bytes, but I would rather keep the current behavior where an Error is returned if the slice is the wrong length than use the "fallible conversion APIs" suggested by the official Rust documentation for these methods. (If the tag is malformed, an Error should be returned, end of story.)

This changes applies to the TryParse impls for BigIntPayload and IntPayload, and the Serialize impls for BigIntPayload, IntPayload, and IndexedSocketAddrPayload.

Implement `cleanup` method for `LobbyList`

A cleanup method should be written to iterate through the LobbyList instance and remove any Lobby instances with a modified property older than some configured threshold (in minutes).

It should be executed regularly on its own thread in the Server instance, but I'm undecided if this should be in addition to the configured number of workers or at the expense of that configured number. (Put another way, I haven't decided if the total number of threads running on a Server should be config.workers or config.workers + 1.)

Whatever the case, the designated thread should sleep for around 30 seconds after each run of cleanup.

Ignore self-reported IP address for "player 0"

Avara was written before routers were common place, and the IP address it reports for the host is the host's LAN address, e.g. 192.168.1.7. Useless for a game tracker.

Somehow it needs to be replaced with the IP from which the "Hello" datagram originated... during Datagram parsing. Or maybe it makes more sense to make the swap when it is inserted into the LobbyList.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.