h3
h3 copied to clipboard
Better names for h3::quic
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()
(aspoll_accept_bi
is more predictable when we havepoll_accept_uni
) -
poll_open_bidi()
->poll_open_bi()
(to be symmetric)
-