Skip to content

Keep a map source ip,port to peer. Add receive state/status. Show that additional status#22

Merged
ldemailly merged 2 commits intomainfrom
receive_indication
Oct 22, 2025
Merged

Keep a map source ip,port to peer. Add receive state/status. Show that additional status#22
ldemailly merged 2 commits intomainfrom
receive_indication

Conversation

@ldemailly
Copy link
Member

No description provided.

@ldemailly ldemailly requested a review from Copilot October 22, 2025 20:57
@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 48.64865% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.47%. Comparing base (02580a6) to head (7a09ebd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tsnet/tsnet.go 52.94% 14 Missing and 2 partials ⚠️
main.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
- Coverage   50.86%   50.47%   -0.39%     
==========================================
  Files           9        9              
  Lines         812      840      +28     
==========================================
+ Hits          413      424      +11     
- Misses        357      372      +15     
- Partials       42       44       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances peer connection tracking by introducing a bidirectional mapping system and distinguishing between sent and received connection states. The changes enable tracking of connections from both the sender's and receiver's perspectives with separate status indicators.

Key Changes:

  • Renamed Connecting status to SentConn and added new ReceivedConn status to differentiate connection initiation from reception
  • Added Sources map to track UDP source address (IP:port) to peer mappings for proper connection request attribution
  • Updated connection handling to set ReceivedConn status when a peer receives a connection request

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tsnet/tsnet.go Core implementation: added Source struct, Sources map, renamed status constants, and updated connection handling to track both sent and received states
tsnet/tsnet_test.go Test updates: verify both SentConn status on sender and ReceivedConn status on receiver, added gocognit linter exception
main.go UI updates: handle renamed SentConn status and add color coding for ReceivedConn status

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@ldemailly ldemailly merged commit 86d141e into main Oct 22, 2025
7 of 9 checks passed
@ldemailly ldemailly deleted the receive_indication branch October 22, 2025 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant