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

TCP support #81

Open
JosefWN opened this issue Apr 19, 2022 · 4 comments
Open

TCP support #81

JosefWN opened this issue Apr 19, 2022 · 4 comments

Comments

@JosefWN
Copy link
Contributor

JosefWN commented Apr 19, 2022

Look into providing support for TCP as specified in RFC 8323.

@JosefWN
Copy link
Contributor Author

JosefWN commented Jul 16, 2022

A first step could be to refactor CoapINetwork in order to generalize the interface, and then make the DTLS examples extend CoapNetworkUDP, where CoapNetworkUDP manages the RawDatagramSocket. This would also reduce some duplicate code.

We could also implement a CoapNetworkTCP just to exercise the new CoapINetwork interface, but leaving this case out of CoapINetwork.fromUri until we have full support.

@JKRhb
Copy link
Contributor

JKRhb commented Aug 7, 2022

Do you think this issue is already resolved with #113? Or do we need some additional logic for correctly handling TCP? I noticed that RFC 8974 introduced a new concept called signaling codes (which we already support via #114), does the client need to take those into account somehow? I haven't had the opportunity to dive into the RFC so far.

@JosefWN
Copy link
Contributor Author

JosefWN commented Aug 7, 2022

I haven't dug into this yet, but I would guess that we need to strip away whatever TCP is already handling under the hood (deduplication, maybe retries). Even though the wire formats are similar they are not identical either, I think MessageID for example is not necessary with TCP because you have a sequence number in the network protocol to handle deduplication.

@JKRhb
Copy link
Contributor

JKRhb commented Dec 4, 2022

After the merge of the latest PRs, I am currently experimenting with an implementation of CoAP over TCP and WebSockets, and made some progress. I'll try to open a PR soon with some initial results, but it might take a week or two until then. As you already mentioned, the similarities and differences between the message formats require some (heavy) refactoring and at least one additional stack implementation. However, I think we are getting close :)

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

No branches or pull requests

2 participants