View full-text article in PMC Sensors (Basel). 2019 Mar 17;19(6):1339. doi: 10.3390/s19061339 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 1 CoAP Request in cNAP isProxyOption←[coap_request] coap_header←[coap_request] Token←[coap_request] request_type←[coap_request] ifrequest_type = = Confirmable then sendemptyACKtorequestingclient request_type←Non-confirmable end if ifisProxyOption = = true then proxyURI←[coap_request] split_proxyURI(hostURI,port,resourceURI,query) isObserveOption←[coap_request] applyrequestaggregation request←newcoap_packet() request←coap_header request←insertOption(hostURI,resourceURI) if portandqueryarenotNULL then request←insertOption(port) request←insertOption(query) end if if isObserveOption = = true then applycoapobservealgorithm request←insertObserveOption() end if if coap_requesthaspayload then request←insertPayload() end if /∗possibilityofICNmulticast ∗multipleserverregisterforthisresource ∗/ creatependingICNpublicationListusingToken SIDhost←sha256_hash(hostURI) SID←COAP_SCOPE_ID+SIDhost RID←generateRandomString() ICN_ID←SID+RID updateICN_ID_to_client_token_list publishrequesttoICNusingICNID end if