Giter Site home page Giter Site logo

Comments (2)

liudongmiao avatar liudongmiao commented on June 15, 2024

LiteSpeed QUIC is a quic library, and use libevent in examples.

from libevent.

liudongmiao avatar liudongmiao commented on June 15, 2024

@azat IMO, libevent don't have to offer something like bufferevent_sock_udp, or even make bufferevent_openssl support quic. However, libevent should return the size of bufferevent_private, so that bufferevent can be extend like bufferevent_openssl (or buffereent_ssl in master), bufferevent_filter, bufferevent_pair, etc.

If we have no bufferevent_private, then most functions of bufferevent_xxx cannot be used, as most of them requires the bufferevent is bufferevent_private (the lock).

In the way of implementing openssl quic / http3, I use the bufferevent_socket (core part of bufferevent_private), then rewrite the callback of ev_write and ev_read, and store the extend part like bufferevent_filter / bufferevent_openssl as bufferevent_context in watermark read / write low, as I found they are only be called in ev_write / ev_read callback, and as I rewrite the callback, so I can use it. (size_t have the same size of void *).

BTW, I use the same trick to implement socket udp (udp socket have special recv and send, and for server, we use the same sock to recv), and implement a simple http2, and websocket over http2, of course, and websocket over http3.

from libevent.

Related Issues (20)

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.