Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: http/3 client #1650

Closed
liudongmiao opened this issue May 7, 2024 · 2 comments
Closed

feature request: http/3 client #1650

liudongmiao opened this issue May 7, 2024 · 2 comments
Labels

Comments

@liudongmiao
Copy link
Contributor

There is udp request on libevent. Now, it's the time for udp and quic.

For client, there would be two parts:

  • udp client
  • quic over udp client, requires ssl library, and maybe nghttp3

For server, there would be two parts:

  • udp server
  • quic over udp server, requires ssl library -- do we need to support this?

In the low-level view, udp is nothing different from tcp in the event of libevent.
However, if we want to offer extra bufferevent like bufferevent_socket_new / bufferevent_socket_connect for tcp, we should offer.

@liudongmiao
Copy link
Contributor Author

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

@azat azat added type:feature subsystem:http HTTP Related issue labels May 7, 2024
@liudongmiao
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants