libevent / libevent/libevent

Add connected callback on http.c module

Open
#1,294 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

prio:accepting-patches subsystem:http
Dominant language
C
Stars
12k
Forks
3.5k
Avg merge
12h 55m
Merged PRs (30d)
6

Description

Our project has been using the libevent library, and recently the project has a requirement to add support for HTTP2. The initial scheme reuses the http module in libevent to implement the HTTP2 protocol (the nghttp2 library is additionally used). The nghttp2 library needs to do some initialization after the https handshake is successful, but we checked the http module source code in the libevent library. There is no such callback If you can add this interface, this will be very useful: 1. You can reuse the http1.0 code in the http module, 2. Based on the first point, http1 & http2 share the same http module, which makes development more convenient , I hope to accept it, thank you.
The specific approach is
in evhttp_error_cb add (*http->conncb)(evcon) on what == BEV_EVENT_CONNECTED condition

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the http.c implementation at evhttp_error_cb and inspect the BEV_EVENT_CONNECTED branch and existing connection callback handling. Determine how a connected callback can be exposed for the HTTP module, then verify that it is invoked after a successful HTTPS handshake without changing existing HTTP behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.