Comments (8)
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.
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.
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.
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.
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.
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.
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.
@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)
- coaps+ws: SSL Context defaults to `None` which make websockets connect through HTTP HOT 6
- pyodide: Prune transports
- How to use port 5683 for both client and server to send and receive device messages HOT 2
- Creating URI for the request without coap scheme HOT 2
- Tests don't cover regular UDP behavior
- Token variable in Message seems to get ignored. HOT 4
- Tradfri: Home Assistant: TypeError("'NoneType' object does not support item assignment") HOT 3
- Specifiy the network interface on windows HOT 3
- Adding Type Annotations and Package Type Information HOT 5
- Keeping DTLS session alive HOT 1
- All appears to be working but no response being delivered HOT 11
- TestServerTCP tests fail garbage collection on 3.12
- How to simultaneously observe multiple resources? HOT 6
- Outdated URL in Readme HOT 1
- Possible to only alert subset of resource observers? HOT 2
- Degraded UX when attempting to interact with non-coap hosts HOT 1
- Network error: [Errno 111] - Cannot interact with CoAP server outside a Docker Container HOT 2
- Drop socknumbers workaround
- How to make an HTTP request from CoAP Server to a REST API served by a web app HOT 1
- Different UDP ports when running in different machines HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aiocoap.