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

WIP: Implement CoAP over TCP #177

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Conversation

JKRhb
Copy link
Contributor

@JKRhb JKRhb commented Feb 18, 2023

As mentioned in some other PR, I started working on improving the CoAP over TCP implementation, adding the necessary logic for exchanging messages. Connecting to a (plain) TCP server and sending and receiving messages already works.

However, responses cannot be matched to requests yet, since the matching logic has to be slightly adjusted (CoAP over TCP messages don't contain message ID or type fields). Furthermore, the layer stack needs to take into account that resending messages isn't needed for reliable transport. The implementation is also lacking support for signaling messages, which need to be sent at the beginning of an exchange. Lastly, I currently perform three stream transformations in a row for incoming TCP segments, which could probably improved efficiency-wise.

So there is still plenty to do, which I hope to deal with over the next couple of weeks.

@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2023

Codecov Report

Patch coverage: 1.61% and project coverage change: -2.72 ⚠️

Comparison is base (c6f2bb1) 29.91% compared to head (b33f1eb) 27.20%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #177      +/-   ##
==========================================
- Coverage   29.91%   27.20%   -2.72%     
==========================================
  Files          62       65       +3     
  Lines        2811     3084     +273     
==========================================
- Hits          841      839       -2     
- Misses       1970     2245     +275     
Impacted Files Coverage Δ
lib/src/coap_client.dart 0.00% <0.00%> (ø)
lib/src/coap_constants.dart 0.00% <0.00%> (ø)
lib/src/coap_empty_message.dart 10.52% <ø> (ø)
lib/src/coap_message.dart 46.26% <0.00%> (-0.38%) ⬇️
lib/src/coap_observe_client_relation.dart 0.00% <0.00%> (ø)
lib/src/coap_request.dart 36.11% <0.00%> (-1.04%) ⬇️
lib/src/codec/tcp/message_decoder.dart 0.00% <0.00%> (ø)
lib/src/codec/tcp/message_encoder.dart 0.00% <0.00%> (ø)
lib/src/net/matcher.dart 0.00% <0.00%> (ø)
lib/src/network/coap_inetwork.dart 0.00% <0.00%> (ø)
... and 6 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@JKRhb
Copy link
Contributor Author

JKRhb commented Jul 2, 2023

I now actually managed to finish the basic logic for connecting and communicating with a server. There is still some more polish required, though.

@BastienGermond
Copy link

Hi @JKRhb, thank you a lot for adding support for CoAP over TCP. Is it something that you plan to keep working on ? I was wondering if the current state does fully support TCP ?

@JKRhb
Copy link
Contributor Author

JKRhb commented Dec 4, 2024

Hi @BastienGermond! I definitely plan to continue working on this :) However, it might only be in a couple of weeks :/ The current state is not really working yet IIRC, but I think you are able to at least send and receive messages – I'll try to have another look at it as soon as possible :)

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.

3 participants