-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Connection.RemoteAddr() by Connection() #171
Replace Connection.RemoteAddr() by Connection() #171
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #171 +/- ##
==========================================
- Coverage 76.11% 75.34% -0.77%
==========================================
Files 24 24
Lines 1834 1866 +32
==========================================
+ Hits 1396 1406 +10
- Misses 326 342 +16
- Partials 112 118 +6
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the change is good. I would prefer we use the name "Connection" or "NetworkConnection" (seems redundant), rather than match the package/struct name of the connection. I will let you decide.
Just to be clear, you suggest |
Yes |
I am implementing TLS in the example server and found that I need access to the underlying net.Conn. I added NetConn() method to access it. Now that we have access to net.Conn, RemoteAddr() is no longer needed, it can be substituted by NetConn().RemoteAddr().
50dae77
to
c9d16ee
Compare
Done. |
I am implementing TLS in the example server and found that I need access to the underlying net.Conn. I added Connection() method to access it. Now that we have access to net.Conn, RemoteAddr() is no longer needed, it can be substituted by Connection().RemoteAddr().
I am implementing TLS in the example server and found that I need access to the underlying net.Conn. I added Connection() method to access it. Now that we have access to net.Conn, RemoteAddr() is no longer needed, it can be substituted by Connection().RemoteAddr().
Note: this is a breaking change.