coap icon indicating copy to clipboard operation
coap copied to clipboard

TCP support

Open JosefWN opened this issue 2 years ago • 4 comments

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

JosefWN avatar Apr 19 '22 13:04 JosefWN

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.

JosefWN avatar Jul 16 '22 10:07 JosefWN

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.

JKRhb avatar Aug 07 '22 10:08 JKRhb

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.

JosefWN avatar Aug 07 '22 15:08 JosefWN