Giter Club home page Giter Club logo

ngtcp2-helper's Introduction

ngtcp2-helper

Provides interface, design details of ngtcp2. Future, will provide easy to use ngtcp2 APIs pre-integrated with various events/ssl libs.

ngtcp2 design rationale

ngtcp2 implementation does not tightly couple with the socket layer nor the SSL implementation. It depends on upper layer to manage the sockets, read/write the sockets on behalf of the ngtcp2. Similarly timers are not directly managed inside ngtcp2. The upper layer (I am calling it APP in the call flows) checks the expiry time from ngtcp2 and starts the timer.

The SSL implementation is also not tightly coupled i.e., the ngtcp2 requires the APP layer to fulfill certain callbacks which in turn could be implemented using any TLS1.3 implementation. The existing example client/server apps in the ngtcp2 use libev for socket management and OpenSSL for TLS1.3 handling.

The advantage with this design is that the app layer is free to choose any event library for sockets, timers etc. The example uses libevent, but libuv can as well be easily plugged in. Similarly the APP controls the TLS1.3 implementation to use and thus could switch the TLS libary in the future.

The ngtcp2 implementation provides QUIC implementation decoupled from any platform libs and thus should be easy to port.

ngtcp2 API flow

Please note that this is not a rigorous representation i.e., the flow is supposed to give an idea about how ngtcp2 APIs manages handshake, connections and streams.

QUIC/ngtcp2 handshake flow

ngtcp2 API flow

QUIC pcap

ngtcp2 client/server examples used. Server UDP port: 12345

QUIC 1-RTT session flow

Above session was resumed using 0RTT flow. QUIC 0-RTT session flow

Certificate and Private key files used from TalkWithTLS. Thanks to Ashok

ngtcp2-helper's People

Contributors

nyrahul avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

coding-ha

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.