-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
introduce a Transport #3794
introduce a Transport #3794
Conversation
5a5d1a6
to
d2bd22e
Compare
9a842b8
to
98af9d4
Compare
Codecov Report
@@ Coverage Diff @@
## master #3794 +/- ##
==========================================
- Coverage 84.18% 83.97% -0.21%
==========================================
Files 141 142 +1
Lines 14128 14208 +80
==========================================
+ Hits 11893 11930 +37
- Misses 1815 1846 +31
- Partials 420 432 +12
|
f79ed84
to
86a1234
Compare
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.
add a GetConfigForClient callback to the Config ### TODO: add tests
one of the commits :)
) | ||
|
||
// rawConn is a connection that allow reading of a receivedPacket. |
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.
Nit: typo
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.
Typo in a removed comment?
// The length of the connection ID in bytes. | ||
// It can be 0, or any value between 4 and 18. | ||
// If unset, a 4 byte connection ID will be used. | ||
ConnectionIDLength int |
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.
Maybe omit ConnectionIDLength
entirely in favor of ConnectionIDGenerator
?
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 consider ConnectionIDGenerator
somewhat of a fringe use case. You only need it if you want to use a Connection ID-based load balancer.
if t.ConnectionIDGenerator != nil { | ||
t.connIDLen = t.ConnectionIDGenerator.ConnectionIDLen() | ||
} else { | ||
connIDLen := t.ConnectionIDLength |
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.
If (Transport).ConnectionIDLength
was removed, this branch on t.isSingleUse
and isServer
can be eliminated.
c7f9709
to
5fdc5c8
Compare
Added tests. Which caught several bugs :) |
0e6f3c1
to
68ffd08
Compare
Part of #3727. Fixes #3797.