aioquic icon indicating copy to clipboard operation
aioquic copied to clipboard

WIP: [connection] public API to retrieve peer address

Open Aniketh01 opened this issue 4 years ago • 4 comments

Aniketh01 avatar Jul 09 '20 06:07 Aniketh01

Codecov Report

Merging #122 into main will decrease coverage by 0.02%. The diff coverage is 50.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##              main     #122      +/-   ##
===========================================
- Coverage   100.00%   99.97%   -0.03%     
===========================================
  Files           24       24              
  Lines         4250     4252       +2     
===========================================
+ Hits          4250     4251       +1     
- Misses           0        1       +1     
Impacted Files Coverage Δ
src/aioquic/quic/connection.py 99.91% <50.00%> (-0.09%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 50fb0f7...fa6579e. Read the comment docs.

codecov[bot] avatar Jul 09 '20 06:07 codecov[bot]

Why isn't this merged? What work is left? Just tests?

ahopkins avatar Dec 09 '21 10:12 ahopkins

At first glance: tests, docstring for the new API.

What's not pleasant: we are arbitrarily returning the first network address. There may be others.

jlaine avatar Dec 30 '21 17:12 jlaine

Maybe an API like this:

connection.peer_addresses.get()  # retrieves the first
connection.peer_addresses.getall()  # retrieves the list
connection.peer_address == connection.peer_addresses.get() 

ahopkins avatar Dec 30 '21 19:12 ahopkins