MJ, Thanks. The CAToken_t in the last review that I made was treated as a NULL terminated printable string. I wanted to make sure that this is true. If it is, I wanted the specification guys to understand that this is a deviation from CoAP that would break interop, which is fine but needs to be understood. If it is not true, then I am seeing a lot of code that needs to be correct for proper handling of the token.
I am also interested in how this works for protocols that may exist under the protocol abstraction that do not have a place (or need) for tokens. Let me review the CAGenerateToken() as a reference to see what types of tokens it generates. Pat From: MyeongGi Jeong [mailto:[email protected]] Sent: Tuesday, January 20, 2015 11:56 PM To: Lankswert, Patrick; iotivity-dev at lists.iotivity.org Subject: Re: [dev] [CA] Redefinition of token in the connectivity abstraction Dear Pat. Hi, Pat. As you said, token is used for track request and response message ( for CONFIRMABLE type ) in Resource Introspection layer. So, CA provides 'CAGenerateToken(CAToken_t* token)' API to RI layer to keep it. And, I think, the word 'token' is not CoAP specific keyword. Usually, to represent the right to perform , the 'token' keyword can be used, I think. CoAP uses it to match the request & response. If CA will provide 'handle' to keep track of request and response pair and token will be managed and be converted to 'handle' by CA, ( extra callback pair also. ) it can be redundant. So, I think that current token passing interface is more efficient. RI can think the CAToken_t is the simple token usually used in computing, not CoAP spec. Thanks... MJ. Best Regards. /** * @name MyeongGi Jeong * @office +82-31-279-9172 * @mobile +82-10-3328-1130 * @email myeong.jeong at samsung.com<mailto:myeong.jeong at samsung.com> */ ------- Original Message ------- Sender : Lankswert, Patrick<patrick.lankswert at intel.com<mailto:patrick.lankswert at intel.com>> Date : 2015-01-20 01:35 (GMT+09:00) Title : [dev] [CA] Redefinition of token in the connectivity abstraction To the connectivity abstraction developers, I have been spot reviewing some of the implementation of the connectivity abstraction. I have a question. Is the token that is used in CoAP is passed through the connectivity abstraction? I ask because a lot of the code treats it as a NULL-terminated string which would be dangerously wrong if CoAP token == CAToken_t. In any case, the use of a token as a method of tying request to response is very CoAP specific. Using a token to tie request to response in a connectivity abstraction is reasonable approach but as an API it is less common than based on request handle or callback/callback_arg, for instance. Patrick Lankswert Intel Corporation Platform Engineering Group (PEG) / Communications and Devices Group (CDG) Engineering Manager Louisville, KY, USA [cid:image001.gif at 01D03599.3A4D3070] [http://ext.samsung.net/mailcheck/SeenTimeChecker?do=b65f9d91e1020aefc3c16f0d6ee12b43dd23a0a5dee733c7032aa89e99be1a3e88d6974bd2f79a3cb3b9c254041823979dd130b31b023ef15296970253332b3707805447a154a46fcf878f9a26ce15a0] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150121/759dfbff/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 13168 bytes Desc: image001.gif URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150121/759dfbff/attachment.gif>
