java-coap icon indicating copy to clipboard operation
java-coap copied to clipboard

Missing API in Transport Context

Open sbernard31 opened this issue 1 year ago • 1 comments

Implementing coap(s)+tcp in Leshan, I faced some issues that could be solve with API additions : (I found workaround for each of them, so there is no urgency)

1. A way to iterate over keys of TransportContext

Maybe a Collection<Key<?>> getKeys() methods ? or make TransportContext implements Iterable ?

Here an example of usage.

2. I need to add all keys from a TransportContext to an other existing TransportContext.

Proposed API :

  • Adding to TransportContext a method with(TransportContext contextToMerge)
  • Adding a CoapRequest.Builder a method addContext(TransportContext contextToMerge)

sbernard31 avatar Apr 19 '24 14:04 sbernard31

Those should be easy ones.. but lets see.

szysas avatar Apr 22 '24 12:04 szysas