Skip to content
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

UV-267 - CoAP proxy server using mproxy #1918

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

SammyOina
Copy link
Contributor

@SammyOina SammyOina commented Oct 8, 2023

What does this do?

  • Refactor: Updated the CoAP server configuration in cmd/coap/main.go to use a new target host and port.
  • Refactor: Removed the Publish method from the Service interface and its implementation in coap/adapter.go, simplifying the message handling process.
  • Refactor: Removed logging and metrics for the Publish method in coap/api/logging.go and coap/api/metrics.go.
  • New Feature: Added a proxyCoAP function in cmd/coap/main.go for handling CoAP proxy operations.
  • New Feature: Introduced a new CoAP handler in coap/handler.go for managing client connections and disconnections, and handling authentication, publishing, and subscribing.

Which issue(s) does this PR fix/relate to?

Resolves https://github.com/ultravioletrs/issues/issues/267

List any changes that modify/break current functionality

Have you included tests for your changes?

Did you document any new/modified functionality?

Notes

@SammyOina SammyOina requested a review from a team as a code owner October 8, 2023 13:04
@SammyOina SammyOina marked this pull request as draft October 8, 2023 13:54
@SammyOina SammyOina force-pushed the uv-267-coap branch 2 times, most recently from be2a7a2 to 4a9b47c Compare October 17, 2023 13:21
@SammyOina SammyOina force-pushed the uv-267-coap branch 2 times, most recently from 5c7f14b to 41af358 Compare October 24, 2023 08:43
@dborovcanin dborovcanin marked this pull request as ready for review October 24, 2023 12:42
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
The httpserver configuration in main.go was updated to use the targetCoAPServerCfg variable instead of the httpServerConfig variable. This change ensures that the correct configuration is used for the httpserver.

Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
The bug was causing the client to acquire the message using the wrong context.
This has been fixed by using the correct context.Background() method.

Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
The sendResp function in transport.go was missing a parameter 'isObs' which caused an error when trying to write the response message. This commit adds the 'isObs' parameter to the function signature and checks if it is false before writing the message. This fixes the bug and ensures that the response is only written when necessary.

Signed-off-by: SammyOina <sammyoina@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant