Git Product home page Git Product logo

sharprudp's Introduction

SharpRUDP

Build Status

Custom C# implementation of a Reliable UDP (RUDP) algorithm.

This project was born because I spent around 2 weeks working on a side project which required reliable UDP packet transmission, and the current options out there weren't up to the task. Why?

  • Codeplex RUDP: It looks great, but too complicated for using it in a simple app.
  • Raknet: The code is huge, and just reading the instructions to use it in C# gave me a headache.
  • Lidgren: Hard to use with C#, it's also a C++ wrapper like Enet, and there's a lack of documentation too.
  • Enet: Lack of documentation for the C# version. It's a wrapper to the C++ library. Hard to debug when used in C#.

I also tried to spin off my own RUDP implementation following the RFC and failing miserably. Those docs are very high-level, and the addendum made the pseudocode algorithm even harder to follow. So, I grew tired of all this and made my own algorithm, featuring...

Features

  • Thread-safe.
  • Retransmission of unacknowledged packets in the next send/reset iteration.
  • Packet data comes in JSON format (for now), so the protocol can be ported to other languages (Node.js anyone?) without much issue.
  • Pure concise, clean C# code. Avoids C++ wrappers and obscure BS. Most of the code is in RUDPConnection.cs and it's < 500 lines long!.
  • Long data can be sent and will be retrieved sequentially, while keeping packet size to the maximum standard MTU value for IPv4 (max. is 300, will try to stay below 500 (+200 for packet data just in case)).

Upcoming features

  • Different serialization options.
  • Keep the connection alive using tiny keepalive packets.

About & License

Created by Alemar Osorio (DARKGuy).

Licensing is temporary GPL. For now, no commercial usage is allowed. This will change in the future though.

sharprudp's People

Contributors

darkguy2008 avatar

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.