Hi Maxi,

The COAP token is cooked up by the client to allow both parties to identify the 
transaction (i.e,. it is a transaction ID). IoTivity server uses this 
information to look up the client session and the client uses it to look up the 
context when it receives the response.

With regards to Jee Hyeok?s comment:

> So cloud interface maps tokens per devices

I?m not familiar with Cloud implementation, but per-device scope is certainly 
better than what typical (proximal) IoTivity server is doing today, which is 
assuming that the token is unique globally (I logged bug IOT-1791). Note that 
per RFC 7252 (https://tools.ietf.org/html/rfc7252#section-5.3.1), servers must 
assume that the scope of COAP token is per individual endpoint.

Way

From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of Jee Hyeok Kim
Sent: Monday, May 1, 2017 7:44 PM
To: maxi wu <maxi.wu at u-media.com.tw>; iotivity-dev at lists.iotivity.org
Subject: Re: [dev] why does CoapClient.sendRequest() changes the value of 
request token?


Hello Maxi Wu!



Yes, it's intended.



The reason is, for managing packet routing.



The coap tokens are created by devices and possible to conflict.



So cloud interface maps tokens per devices and make it unique inside cloud that 
to be handled by other backend utility resources.

(Also protect system by malicious packets)



We are under re-architecturing internal protocols to simplify source code.



Best Regards

JK



--------- Original Message ---------

Sender : maxi wu <maxi.wu at u-media.com.tw<mailto:maxi.wu at u-media.com.tw>>

Date : 2017-05-01 15:37 (GMT+9)

Title : [dev] why does CoapClient.sendRequest() changes the value of request 
token?


Hi,

I suppose this behavior is intended, but couldn?t figure out the reasoning.
the token is supposed to use to match request and response, but why does the 
mTokenExchanger in sendRequest() change that?
the newToken is an incremental number, also do not understand the purpose of 
this.
Could someone explain this design?

Best Regards,
Maxi Wu
maxi.wu at u-media.com.tw<mailto:maxi.wu at u-media.com.tw>
tel: +886 3 579 7969 ext 8319


_______________________________________________

iotivity-dev mailing list

iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org>

https://lists.iotivity.org/mailman/listinfo/iotivity-dev

| Jee Hyeok, Kim | IoT Solution Lab, SW Center | Mobile) +82-10-9168-3641 |





[cid:image001.gif at 01D2C32B.6B951C70]

[http://ext.samsung.net/mail/ext/v1/external/status/update?userid=jihyeok13.kim&do=bWFpbElEPTIwMTcwNTAyMDI0NDE5ZXBjbXMxcDg0YmU4OWFmYmZjZmMxMGRmZWM4OTg5YzlmMjZjZDM5YyZyZWNpcGllbnRBZGRyZXNzPWlvdGl2aXR5LWRldkBsaXN0cy5pb3Rpdml0eS5vcmc_]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170502/bd26c94f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 13402 bytes
Desc: image001.gif
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170502/bd26c94f/attachment.gif>

Reply via email to