Keep a map source ip,port to peer. Add receive state/status. Show that additional status#22
Keep a map source ip,port to peer. Add receive state/status. Show that additional status#22
Conversation
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
Connectingstatus toSentConnand added newReceivedConnstatus to differentiate connection initiation from reception - Added
Sourcesmap to track UDP source address (IP:port) to peer mappings for proper connection request attribution - Updated connection handling to set
ReceivedConnstatus 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.
No description provided.