'A' does make sense.
I just thought 'C' would be more flexible. So 'C' can be 'A', can be 'B', or even something in between. Like:
function myRespondASAPHandler(event){
NRF.confirmIndication(event);
//do something ...
}
function myRespondAfterDoneHandler(event){
//do something
NRF.confirmIndication(event);
}
...
characteristic.on('characteristicvaluechanged', (event)=>myRespondAfterDoneHandler(event));
Response "After Done" will serve scenarios where processing of a message may take time. So it will prevent flooding the Client by too frequent indications. Otherwise some additional synchronization logic should be done, like skipping next coming indications if a current one is still in processing.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
'A' does make sense.
I just thought 'C' would be more flexible. So 'C' can be 'A', can be 'B', or even something in between. Like:
Response "After Done" will serve scenarios where processing of a message may take time. So it will prevent flooding the Client by too frequent indications. Otherwise some additional synchronization logic should be done, like skipping next coming indications if a current one is still in processing.