Conversation
JoTurk
left a comment
There was a problem hiding this comment.
yeah this is a good direction, we need to add more validations tho.
f888d39 to
1192971
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #450 +/- ##
==========================================
+ Coverage 83.81% 84.01% +0.19%
==========================================
Files 52 54 +2
Lines 4060 4266 +206
==========================================
+ Hits 3403 3584 +181
- Misses 480 493 +13
- Partials 177 189 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
124aeb4 to
32dc80b
Compare
32dc80b to
8021a05
Compare
8021a05 to
aa606bd
Compare
|
^ mean making newAssociationWithOptions through new APIs to construct Client and Server. |
aa606bd to
c1a345b
Compare
JoTurk
left a comment
There was a problem hiding this comment.
looks good, just need to finish it, fix the lint and it's ready for merge.
ef25bcb to
5cdf355
Compare
@JoTurk I'm not sure if the client and server need to have specific settings for each beyond the existing options. Did you have something more specific in mind? I left a couple TODO's that you can ctrl+f in Also looking into |
|
@philipch07 In DTLS we have Option which is a union between client and server options. For SCTP we don't need this split now because our current options symmetric, but IMO it's nice to split them early before we eventually add dial/listen APIs in v2 and different options for client and server with overlapping options. 100% up to you, I support any choice you pick. |
527f759 to
f71b4fd
Compare
|
how do we make progress? I have a local rebase of #449 ontop of this and it seems to work ok |
| loggerFactory := logging.NewDefaultLoggerFactory() | ||
| opts = append([]AssociationOption{WithLoggerFactory(loggerFactory)}, opts...) | ||
|
|
||
| clientCfg := Config{NetConn: ca} | ||
| serverCfg := Config{NetConn: cb} | ||
|
|
||
| for _, opt := range opts { | ||
| if err := opt.applyClient(&clientCfg); err != nil { | ||
| _ = ca.Close() | ||
| _ = cb.Close() | ||
|
|
||
| return nil, nil, err | ||
| } | ||
| if err := opt.applyServer(&serverCfg); err != nil { | ||
| _ = ca.Close() | ||
| _ = cb.Close() | ||
|
|
||
| return nil, nil, err | ||
| } | ||
| } |
There was a problem hiding this comment.
Not a big deal but maybe we should try to test the external functions instead, so refactoring is less painful.
1276fd5 to
a714f13
Compare
JoTurk
left a comment
There was a problem hiding this comment.
This is just missing the public constructors :) ServerWithOptions& ClientWithOptions
9975511 to
59aa13b
Compare
59aa13b to
675bd76
Compare
- Add public options contructors - Do not run options tests for wasm - Update examples to options --------- Co-authored-by: Jo Turk <[email protected]>
675bd76 to
6fcb82c
Compare
Description
Uses the options pattern instead of the config pattern, which is a necessary change before adding SNAP (#449).
Reference issue
Resolves #446