hyperium / hyperium/h3

Better names for h3::quic

Open
#146 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-refactor
Dominant language
Rust
Stars
890
Forks
136
Avg merge
14d 20h
Merged PRs (30d)
2

Description

The name poll_accept_recv is a bit counter-intuitive. Is it accepting the peer's request for receiving? But it's actually meant for accepting a unidirectional (send) stream from the peer, or in the caller's perspective, opening a stream for receiving. So it may not be a good name for the case, as it requires people to do a bit interpretation to figure out what the function is supposed to do.

quinn's API Connection::accept_uni feels much more intuitive, accepting unidirectional communication from the peer. And it's clear that it's for receiving in the context.

Proposal for API changes:

  • poll_accept_recv() -> poll_accept_uni()
  • poll_open_send() -> poll_open_uni() (to be symmetric and predictable)
  • Maybe?
    • poll_accept_bidi() -> poll_accept_bi() (as poll_accept_bi is more predictable when we have poll_accept_uni)
    • poll_open_bidi() -> poll_open_bi() (to be symmetric)

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

Locate the public API occurrences of poll_accept_recv, poll_open_send, poll_accept_bidi, and poll_open_bidi, then review the naming proposal against quinn's Connection::accept_uni API. Done means the agreed names are applied consistently and the affected tests or documentation use the updated API.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, networking
Issue type
Refactor
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.