-
Notifications
You must be signed in to change notification settings - Fork 10
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
NOISSUE - Migrate gocoap library from v2 to v3.3 #8
Conversation
bb2d8c1
to
5f9b9fe
Compare
bd529e7
to
a8a74bd
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.
Since we are supporting all functions of coap , we should have test case for all methods with all options with some publicly available coap sever like https://coap.me/crawl/coap://coap.me
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.
Suggestion for KeepClient Connection Alive https://github.com/1998-felix/coap-cli/blob/d4705eed8646741d28d1fd7a2aac0bc9bb987368/coap/client.go#L29-L36
func New(addr string) (Client, error) {
c, err := udp.Dial(addr, options.WithKeepAlive(10, 60*time.Second, func(cc *client.Conn) { fmt.Println(cc.Ping(cc.Context())) }))
if err != nil {
log.Fatalf("Error dialing: %v", err)
}
return Client{conn: c}, nil
}
In additonal , It will be great if we provide flags to set have keep Alive time out in client
If flag is not available defaults to 60 seconds.
If KeepAlive Time flag is 0 then it should not add KeepAlive function during connect.
Please resolve conflicts. |
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
9744d39
to
05879cb
Compare
Signed-off-by: 1998-felix <[email protected]>
05879cb
to
c265729
Compare
Signed-off-by: 1998-felix <[email protected]>
Signed-off-by: 1998-felix <[email protected]>
893ae05
to
fceaaee
Compare
fceaaee
to
28cf982
Compare
Signed-off-by: 1998-felix <[email protected]>
28cf982
to
2f82c70
Compare
Signed-off-by: 1998-felix <[email protected]>
1d8569a
to
ab88344
Compare
Signed-off-by: 1998-felix <[email protected]>
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.
Server disconnection idle client leads to new problem
The client doesn't know the disconnection, and client again send disconnection request to server
So we are getting error in server like {"time":"2024-05-16T10:17:46.594334142Z","level":"WARN","msg":"Unsubscribe failed to complete successfully","duration":"31.172803ms","channel_id":"dff59205-90d6-430d-9903-a611cd401bb3","error":"not subscribed"}
It looks like the problem is that the subscribed client isn't aware of the broken subscription, which makes sense due to the connectionless nature of the underlying UDP. We can merge this one, but @arvindh123 please open a ticket to remind us to double-check this. |
What type of PR is this?
This is a feature because it migrates the version of the coap library from v2 to v3.3
What does this do?
plg-dev\go-coap
library fromv2
tov3.3
spf13/cobra
Which issue(s) does this PR fix/relate to?
Resolves https://github.com/absmach/magistrala/issues/2203
Have you included tests for your changes?
Yes, I have included tests for my changes.
Did you document any new/modified feature?
No,
Notes
No,