renetcode

Server/Client network protocol library for multiplayer games

12 releases

0.0.12 Jul 20, 2024
0.0.11 Feb 21, 2024
0.0.10 Nov 12, 2023
0.0.9 Jul 20, 2023
0.0.1 Jan 30, 2022

#638 in Network programming

Download history 451/week @ 2024-06-25 224/week @ 2024-07-02 330/week @ 2024-07-09 576/week @ 2024-07-16 623/week @ 2024-07-23 481/week @ 2024-07-30 465/week @ 2024-08-06 589/week @ 2024-08-13 340/week @ 2024-08-20 452/week @ 2024-08-27 719/week @ 2024-09-03 405/week @ 2024-09-10 433/week @ 2024-09-17 653/week @ 2024-09-24 454/week @ 2024-10-01 332/week @ 2024-10-08

1,975 downloads per month
Used in 4 crates (via renet)

MIT/Apache

99KB
2K SLoC

Renetcode

Latest version Documentation MIT Apache

Renetcode is a simple connection based client/server protocol, was developed be used in games with UDP in mind, but can be used with other transports methods. Implements the Netcode 1.02 standard, available here and the original implementation in C is available in the netcode repository.

Has the following feature:

  • Encrypted and signed packets
  • Secure client connection with connect tokens
  • Connection based protocol

and protects the game server from the following attacks:

  • Zombie clients
  • Man in the middle
  • DDoS amplification
  • Packet replay attacks

Usage

Check out the echo example to see an usage with UDP. Run the server with:

cargo run --example echo -- server 5000 

run the client with:

cargo run --example echo -- client 5000 my_username

Dependencies

~1MB
~16K SLoC