Giter VIP home page Giter VIP logo

Comments (8)

luciotorre avatar luciotorre commented on August 9, 2024

From the standard

When a server is aware that a request arrived via multicast, the server MAY always ignore the request, in particular if it doesn't have anything useful to respond (e.g., if it only has an empty payload or an error response). The decision for this may depend on the application.

Maybe this helps. Not that i know how to make aiocoap do this as it will always try to send a response. :)

from aiocoap.

chrysn avatar chrysn commented on August 9, 2024

is it a multicast or a unicast situation this relates to?

for multicast, that's something that is not supported well right now.

for unicast, i'd be rather reluctant to add that unless it is aligned with whatever comes out of draft-tcs-coap-no-response-option. what do you need not sending anything at all for?

from aiocoap.

arurke avatar arurke commented on August 9, 2024

Hi, I was not aware of the work being done in the draft-tcs-coap-no-response-option. My use-case is unicast and it matches the scenarios described there perfectly. I agree on not adding something until the draft is concluded. I will use my hack for now, which for reference looks like this in protocol.py:991:

 # Special case when we don't want the server to reply
if(response.code == DO_NOT_REPLY):
 cancel_thoroughly(delayed_ack)
 self.app_request.cancel()
 return

Also added the DO_NOT_REPLY code to code.py

Thx for the reply and link to no-response-option.

from aiocoap.

luciotorre avatar luciotorre commented on August 9, 2024

Something like that would be great for me to support multicast with no replies. Would it make sense to add it to aiocoap in lieu of a more complete Multicast support?

from aiocoap.

arurke avatar arurke commented on August 9, 2024

It seems the draft has concluded in RFC7967
https://tools.ietf.org/html/rfc7967
As of now I have no immediate need for it (need to make embedded client side first), but still curious if you have intentions of adding to aiocoap?

from aiocoap.

chrysn avatar chrysn commented on August 9, 2024

I should maybe have more explicit in the commit message: if you're using the current master, your render method can return the aiocoap.message.NoResponse sentinel.

from aiocoap.

arskanov avatar arskanov commented on August 9, 2024

This is one of the top results when searching for 'aiocoap no-response'.

In case the steps for activating the "no-response" functionality as in RFC7967 in aiocoap are unclear:

  • No-response must be set for the response class being generated
  • The return message must be of type NON

Here's how its set up for me:

async def render_post(self, request):
        resp_mtype = request.mtype
        return aiocoap.Message(mtype=resp_mtype)

This will not send a response if the request message is of type NON.

from aiocoap.

chrysn avatar chrysn commented on August 9, 2024

@arskanov, this issue is related to the (long done) introduction of No-Response, which has been changed quite a bit since (cf #109, 0d09b2e).

If anything is wrong with no-response in current master, please open a dedicated issue.

from aiocoap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.