Open theisHafele opened 1 month ago
Yes, it is supported. By default, it sends a confirmable response, but you can set the message type to Non/Con by using the function func (r *Message) SetType(typ message.Type). This type is also used throughout the entire blockwise transfer process.
Thanks for the response. Sorry, I should have been more clear. I meant the part that says:
Confirmable response in reply to a Non-Confirmable request
So as a client sending a non-confirmable request, is a confirmable response handled or would I need to set up a server to handle it as a request?
It's up to you to set the desired message type in the server handler. By default, if a non-confirmable request is received, the go-coap server sends a response with a confirmable message type, requiring the client to send an acknowledgment. However, you can use the SetType
function to override this and have the server reply with a non-confirmable message as well.
From RFC7252 section 5.2.3
Is this currently supported/handled by the library? If not, what's the idiomatic way of preparing the endpoint as a client using the go-coap library?