baidu / baidu/sofa-pbrpc

RpcServer::Start端口冲突问题

Open
#192 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.1k
Forks
649
PR merge metrics
No merged PRs in 30d

Description

您好,目前我这边有个问题想确认下,就是调用RpcServer::Start时,如果传入的server_address已经被绑定的话,sofarpc里面会自动重新分配一个空闲的端口绑定吗?如果可以的话,要怎样才能获取重新分配的空闲端口呢?而且我这边有尝试在调用RpcServer::Start时,传入的server_address为0.0.0.0:0,这样也是可以成功的,但是怎样才能获取我真正绑定的端口呢?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the RpcServer::Start entry point and trace how server_address, including 0.0.0.0:0, is bound and whether the selected port is retained or exposed. No files or tests are named; done means the port-allocation behavior and a reliable way to obtain the bound port are specified and covered by an appropriate test.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.