open-coap / java-coap

CoAP Java library
Apache License 2.0
18 stars 5 forks source link

Missing API in Transport Context #82

Open sbernard31 opened 2 months ago

sbernard31 commented 2 months ago

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 :

szysas commented 2 months ago

Those should be easy ones.. but lets see.