All Projects → tim-oster → rmnp

tim-oster / rmnp

Licence: MIT License
Realtime Multiplayer Networking Protocol

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to rmnp

Netcode
A protocol for secure client/server connections over UDP
Stars: ✭ 2,121 (+5073.17%)
Mutual labels:  packets, udp, protocol
Pypacker
📦 The fastest and simplest packet manipulation lib for Python
Stars: ✭ 216 (+426.83%)
Mutual labels:  packets, udp, protocol
Node Minecraft Protocol
Parse and serialize minecraft packets, plus authentication and encryption.
Stars: ✭ 697 (+1600%)
Mutual labels:  packets, protocol
433MHz Tx Rx
Arduino based 433MHz Tx and Rx combo using Manchester protocol
Stars: ✭ 27 (-34.15%)
Mutual labels:  packets, protocol
Socket-Programming-With-C
✉️ Learn Network Protocol and Network Programming
Stars: ✭ 147 (+258.54%)
Mutual labels:  udp, protocol
Hazel Networking
Hazel Networking is a low level networking library for C# providing connection orientated, message based communication via TCP, UDP and RUDP.
Stars: ✭ 194 (+373.17%)
Mutual labels:  udp, protocol
Pjon
PJON (Padded Jittering Operative Network) is an experimental, arduino-compatible, multi-master, multi-media network protocol.
Stars: ✭ 2,615 (+6278.05%)
Mutual labels:  udp, protocol
Ruffles
Lightweight and fully managed reliable UDP library.
Stars: ✭ 131 (+219.51%)
Mutual labels:  udp, protocol
ProtocolLib
Provides read and write access to the Minecraft protocol with Bukkit.
Stars: ✭ 625 (+1424.39%)
Mutual labels:  packets, protocol
jfastnet
Fast, reliable UDP messaging for Java. Designed for games.
Stars: ✭ 26 (-36.59%)
Mutual labels:  udp, reliable-udp
node-drivers
Industrial protocol drivers in node.js
Stars: ✭ 20 (-51.22%)
Mutual labels:  udp, protocol
Quic.net
A .NET C# Implementation of QUIC protocol - Google's experimental transport layer.
Stars: ✭ 173 (+321.95%)
Mutual labels:  udp, protocol
Yojimbo
A network library for client/server games written in C++
Stars: ✭ 2,041 (+4878.05%)
Mutual labels:  udp, protocol
Polymorph
Polymorph is a real-time network packet manipulation framework with support for almost all existing protocols
Stars: ✭ 364 (+787.8%)
Mutual labels:  packets, protocol
Node Lifx
Node.js implementation of the LIFX LAN protocol 💡
Stars: ✭ 137 (+234.15%)
Mutual labels:  udp, protocol
diepssect
A public repo for hacky diep stuff - networking protocol, WebAssembly, memory editing, & physics
Stars: ✭ 26 (-36.59%)
Mutual labels:  packets, protocol
Kcp
⚡ KCP - A Fast and Reliable ARQ Protocol
Stars: ✭ 10,473 (+25443.9%)
Mutual labels:  udp, protocol
Mud
Multipath UDP library
Stars: ✭ 100 (+143.9%)
Mutual labels:  udp, protocol
laminar
A simple semi-reliable UDP protocol for multiplayer games
Stars: ✭ 717 (+1648.78%)
Mutual labels:  udp, protocol
net-protocol
golang模拟内核协议栈 实现链路层、网络层、传输层、应用层 用户态协议栈 ,基于虚拟网卡TUN/TAP
Stars: ✭ 129 (+214.63%)
Mutual labels:  udp, protocol

RMNP - Realtime Multiplayer Networking Protocol

RMNP aims to combine all the advantages of TCP and the speed of UDP in order to be fast enough to support modern realtime games like first person shooters. It is basically an extension for UDP.

Features

  • Connections (with timeouts and ping calculation)
  • Error detection
  • Small overhead (max 15 bytes for header)
  • Simple congestion control (avoids flooding nodes between sender/receiver)
  • Optional reliable and ordered packet delivery

How it works

The bad thing about TCP is that once a packet is dropped it stops sending all other packets until the missing one is delivered. This can be a huge problem for games that are time sensitive because it is not uncommon for devices to encounter packet-loss. Therefore RMNP facilitates UDP to guarantee fast delivery without any restrictions. Because UDP is stateless RMNP implements an easy way to handle connection and to distinguish between "connected" clients. Every packet contains a small header mainly containing a CRC32 hash to ensure that all received packets were transmitted correctly.

To guarantee reliability the receiver sends acknowledgment packets back to tell the sender which packets it received. The sender resends each packet until it received an acknowledgment or the maximum timeout is reached. Because of that RMNP is not 100% reliable but it can be assumed that a packet will be delivered unless a client has a packet-loss of about 100% for a couple seconds.

Getting started

Installation

go get github.com/obsilp/rmnp

Basic Server

Example Pong Server

package main

import "github.com/obsilp/rmnp"

func main() {
	server := rmnp.NewServer(":10001")
	server.Start() // non-blocking

	// other code ...
}

Basic Client

Example Ping Client

package main

import "github.com/obsilp/rmnp"

func main() {
	client := rmnp.NewClient("127.0.0.1:10001")
	client.Connect() // non-blocking

	// other code ...
}

Callbacks

Events and received packets can be received by setting callbacks. Look at the respective classes for more information.

Client callbacks | Server callbacks

Send types

  • Unreliable - Fast delivery without any guarantee on arrival or order
  • Unreliable Ordered - Same as unreliable but only the most recent packet is accepted
  • Reliable - Packets are guaranteed to arrive but not in order
  • Reliable Ordered - Packets are guaranteed to arrive in order

Ports

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].