All Projects → Vect0rZ → Quic.net

Vect0rZ / Quic.net

Licence: bsd-2-clause
A .NET C# Implementation of QUIC protocol - Google's experimental transport layer.

Projects that are alternatives of or similar to Quic.net

Ngtcp2
ngtcp2 project is an effort to implement IETF QUIC protocol
Stars: ✭ 589 (+240.46%)
Mutual labels:  networking, protocol, udp, quic
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 (+12.14%)
Mutual labels:  networking, protocol, udp
Ruffles
Lightweight and fully managed reliable UDP library.
Stars: ✭ 131 (-24.28%)
Mutual labels:  networking, protocol, udp
Kcp
⚡ KCP - A Fast and Reliable ARQ Protocol
Stars: ✭ 10,473 (+5953.76%)
Mutual labels:  udp, protocol, quic
Enet Csharp
Reliable UDP networking library
Stars: ✭ 464 (+168.21%)
Mutual labels:  networking, protocol, udp
Laminar
A simple semi-reliable UDP protocol for multiplayer games
Stars: ✭ 530 (+206.36%)
Mutual labels:  networking, protocol, udp
Lsquic
LiteSpeed QUIC and HTTP/3 Library
Stars: ✭ 727 (+320.23%)
Mutual labels:  protocol, udp, quic
Udp Ue4
Convenience UDP wrapper for Unreal Engine 4
Stars: ✭ 94 (-45.66%)
Mutual labels:  networking, udp
Mud
Multipath UDP library
Stars: ✭ 100 (-42.2%)
Mutual labels:  protocol, udp
Reactor Netty
TCP/HTTP/UDP/QUIC client/server with Reactor over Netty
Stars: ✭ 1,743 (+907.51%)
Mutual labels:  udp, quic
Redcon
Redis compatible server framework for Go
Stars: ✭ 1,683 (+872.83%)
Mutual labels:  networking, protocol
Stream
NodeJS Modbus Stream
Stars: ✭ 114 (-34.1%)
Mutual labels:  stream, udp
Quinn
Async-friendly QUIC implementation in Rust
Stars: ✭ 1,859 (+974.57%)
Mutual labels:  protocol, quic
Base Drafts
Internet-Drafts that make up the base QUIC specification
Stars: ✭ 1,270 (+634.1%)
Mutual labels:  protocol, quic
Msquic
Cross-platform, C implementation of the IETF QUIC protocol.
Stars: ✭ 2,501 (+1345.66%)
Mutual labels:  protocol, quic
Warpcore
User-space UDP/IP stack on top of netmap
Stars: ✭ 67 (-61.27%)
Mutual labels:  udp, quic
Netdynamics
Data-oriented networking playground for the reliable UDP transports
Stars: ✭ 65 (-62.43%)
Mutual labels:  networking, udp
Ignorance
Ignorance utilizes the power of ENet to provide a reliable UDP networking transport for Mirror Networking.
Stars: ✭ 158 (-8.67%)
Mutual labels:  networking, udp
Node Lifx
Node.js implementation of the LIFX LAN protocol 💡
Stars: ✭ 137 (-20.81%)
Mutual labels:  protocol, udp
Netcode
A protocol for secure client/server connections over UDP
Stars: ✭ 2,121 (+1126.01%)
Mutual labels:  protocol, udp

0x5C2AAD80

Build Status

QuicNet

Table of contents

What is QuicNet?

QuicNet is a .NET implementation of the QUIC protocol mentioned below. The implementation stays in line with the 32nd version of the quic-transport draft, and does NOT YET offer implementation of the following related drafts:

Get started

Minimal working examples

Preview

Alt

Server

using System;
using System.Text;
using QuicNet;
using QuicNet.Streams;
using QuicNet.Connections;

namespace QuickNet.Tests.ConsoleServer
{
    class Program
    {
        // Fired when a client is connected
        static void ClientConnected(QuicConnection connection)
        {
            connection.OnStreamOpened += StreamOpened;
        }
        
        // Fired when a new stream has been opened (It does not carry data with it)
        static void StreamOpened(QuicStream stream)
        {
            stream.OnStreamDataReceived += StreamDataReceived;
        }
        
        // Fired when a stream received full batch of data
        static void StreamDataReceived(QuicStream stream, byte[] data)
        {
            string decoded = Encoding.UTF8.GetString(data);
            
            // Send back data to the client on the same stream
            stream.Send(Encoding.UTF8.GetBytes("Ping back from server."));
        }
        
        static void Main(string[] args)
        {
            QuicListener listener = new QuicListener(11000);
            listener.OnClientConnected += ClientConnected;

            listener.Start();

            Console.ReadKey();
        }
    }
}

Client

using System;
using System.Text;
using QuicNet.Connections;
using QuicNet.Streams;

namespace QuicNet.Tests.ConsoleClient
{
    class Program
    {
        static void Main(string[] args)
        {
            QuicClient client = new QuicClient();

            // Connect to peer (Server)
            QuicConnection connection = client.Connect("127.0.0.1", 11000);
            // Create a data stream
            QuicStream stream = connection.CreateStream(QuickNet.Utilities.StreamType.ClientBidirectional);
            // Send Data
            stream.Send(Encoding.UTF8.GetBytes("Hello from Client!"));   
            // Wait reponse back from the server (Blocks)
            byte[] data = stream.Receive();

            Console.WriteLine(Encoding.UTF8.GetString(data));

            // Create a new data stream
            stream = connection.CreateStream(QuickNet.Utilities.StreamType.ClientBidirectional);
            // Send Data
            stream.Send(Encoding.UTF8.GetBytes("Hello from Client2!"));
            // Wait reponse back from the server (Blocks)
            data = stream.Receive();

            Console.WriteLine(Encoding.UTF8.GetString(data));

            Console.ReadKey();
        }
    }
}

What is QUIC?

QUIC is an experimental transport layer protocol designed by Google, aiming to speed up the data transfer of connection-oriented web applications. This application-level protocol aims to switch from TCP to UDP by using several techniques to resemble the TCP transfer while reducing the connection handshakes, as well as to provide sensible multiplexing techniques in a way that different data entities can be interleaved during transfer.

Connections

Connections are the first tier logical channels representing a communication between two endpoints. When a connection is established, a ConnectionId is negotiated between the two endpoints. The ConnectionId is used for identifying connection even if changes occur on the lower protocol layers, such as a Phone changing Wi-Fi or switching from Wi-Fi to Mobile data. This mechanism prevents restarting the negotiation flow and resending data.

Streams

Streams are second tier logical channels representing streams of data. A single connection can have a negotiated number of streams (8 maximum for example) which serve as multiplexing entities. Every stream has it's own, generated StreamId, used for identifiying the different data objects being transferred. Streams are closed when all of the data is read, or the negotiated maximum data transfer is reached.

Packet

Packets are the data transfer units. The packet header contains information about the connection that this packet is being sent to, and cryptographic information. After stipping off the additional transfer information, what is left are the Frames of data (A packet can have multiple frames).

Frame

Frames are the smallest unit that contain either data that needs to be trasferred to the Endpoint or protocol packets necessary for actions such as handshake negotiation, error handling and other.

Contributing

Following the Fork and Pull GitHub workflow:

  1. Fork the repo on GitHub;
  2. Clone the project locally;
  3. Commit changes;
  4. Push your work back up to your fork;
  5. Submit a Pull request so that the changes go through a review.

For more info, read the CONTRIBUTING

More

The quic-transport draft can be found, as previously mentioned at quic-transport.

To test QUIC and find additional information, you can visit Playing with QUIC.

The official C++ source code can be found at proto-quic.

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].