Closed jeffwelder-ellenbytech closed 9 months ago
I would like my application to get notified of Confirmable Empty Message requests (Pings) to keep track of routable paths during observe.
Currently I believe this code prevents that from happening: https://github.com/plgd-dev/go-coap/blob/a48812ee4db5dbec9c8fb43496e8fc83dee79f7b/udp/client/conn.go#L785C2-L787C3
if r.Code() == codes.Empty && r.Type() == message.Confirmable && len(r.Token()) == 0 && len(r.Options()) == 0 && r.Body() == nil { cc.ProcessReceivedMessageWithHandler(r, cc.handlePong) return true }
I would like to be able to handle this route either through router.DefaultHandle(), or passing in a configuration that allows you to create your own handlePong function.
router.DefaultHandle()
handlePong
Are there any concerns to bellying this up to the application?
Closed by #511
I would like my application to get notified of Confirmable Empty Message requests (Pings) to keep track of routable paths during observe.
Currently I believe this code prevents that from happening: https://github.com/plgd-dev/go-coap/blob/a48812ee4db5dbec9c8fb43496e8fc83dee79f7b/udp/client/conn.go#L785C2-L787C3
I would like to be able to handle this route either through
router.DefaultHandle()
, or passing in a configuration that allows you to create your ownhandlePong
function.Are there any concerns to bellying this up to the application?