apache / apache/brpc

server支持OnNewConnection(...), OnClosedConnection(...)回调

Open
#2,424 11 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
C++
Stars
17.6k
Forks
4.1k
Avg merge
2d 12h
Merged PRs (30d)
69

Description

**Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
我们在用户层面实现了基于Connection : Session = 1: 1的功能,需要在connection建立和断开时对session进行保存和删除。

**Describe the solution you'd like (描述你期望的解决方法)**
希望ServerOption提供OnNewConnection, OnClosedConnection的回调, 以便在用户代码中管理连接信息。

Contributor guide

Open the contributing guide

Research direction

Start by locating ServerOption and the server connection lifecycle in the brpc source. Trace where connections are established and closed, then review existing tests or callback conventions before defining the callback behavior. Done means both callbacks are exposed through ServerOption, invoked at the appropriate lifecycle points, and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend-api-design
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.