-
Notifications
You must be signed in to change notification settings - Fork 408
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
How to add CoAP resources to CoapServer now that CoapAPI is gone #1511
Comments
Hi, The
So for now ... the is no best approach, OR maybe implementing your own But I agree that this should be improved. (Transport Layer Abstraction is still an in development feature ...) Is getting access to the |
Actually we only need We also use the CoAP-level In my opinion, simply adding a public getter for CoapServer on the endpoints provider would work. Probably also adding a getter for the endpoints provider on LeshanServer would be convenient 🤔 Alternatively making it protected, but that's more hassle 🤷 |
+1 |
Agree
The send CoAP API from
(So maybe at some time I should reintroduce it)
Yep, I also think something like this could be useful. I need to think about how it could looks like.
|
I'd go with a list for now.
That's just my 2 cents, you might very well know better. |
I will probably follow your advice in a first time. I'm on something else for now, but I will let you know as soon as I move forward on this. |
I created a small PR about that : #1516 |
@niklas-sparfeld-gcx, let me know if this fits your needs ? |
It does 👍 |
OK 🙂, I integrated OR #1516 in For "LWM2M oriented send CoAP Request" feature, we will see later, if needed we will create a dedicated issue. |
Question
Hi! 👋
In our Leshan server implementations we added some custom pure CoAP resources to Leshan's underlying CoapServer, by calling into the CoapAPI:
server.coap().server.add(CustomCoapResource())
Our most important use-case is a simple file server. Of course, we could (and maybe should) serve files via a separate CoAP server, but our current approach is light-weight and works well for us.
With 2.0.0-M11 you removed the CoapAPI and I cannot find out how to add custom resources now.
Of course, there's reflection, but...
Is there a better approach that I'm missing?
Thanks 👍
The text was updated successfully, but these errors were encountered: