简体   繁体   English

关于 CoAP 客户端代理功能

[英]Regarding CoAP Client proxy funtionality

I'm developing CoAP Client proxy funtionailty.我正在开发 CoAP 客户端代理功能。 But, I'm confused the spec and how it works.但是,我对规范及其工作方式感到困惑。 What I'm confused as the following:我对以下内容感到困惑:

  1. Proxy-URI option代理 URI 选项

    1.1 Which coap server can be connected if Proxy-URI option is setup? 1.1 如果设置了Proxy-URI选项,可以连接哪个coap服务器?

    1.2 Should CoAP request message include URI-* options if there is Proxy-URI option? 1.2 如果有Proxy-URI选项,CoAP请求消息是否应该包含URI-*选项? As far as I know, the URI-* options should be included.据我所知,应该包括 URI-* 选项。 But, the URI-* options are skipped in libcoap code.但是,在 libcoap 代码中跳过了 URI-* 选项。

  2. Proxy-Scheme option代理方案选项

    2.1 How to construct URI-* options if proxy-scheme option is present? 2.1 如果存在代理方案选项,如何构造 URI-* 选项? If it's present, normal URI-* options should be skipped or not?如果存在,是否应该跳过正常的 URI-* 选项?

ad 1.2: The Proxy-Uri and the other Uri-* options are mutually exclusive. ad 1.2:Proxy-Uri 和其他 Uri-* 选项是互斥的。 There can be either a Proxy-Uri or any combination of Uri-* options.可以有 Proxy-Uri 或 Uri-* 选项的任意组合。 Think of the Proxy-Uri option as an alternative representation of (Proxy-Scheme, Uri-Host, Uri-Port, ...), and whenever possible avoid using Proxy-Uri.将 Proxy-Uri 选项视为 (Proxy-Scheme, Uri-Host, Uri-Port, ...) 的替代表示,并尽可能避免使用 Proxy-Uri。

ad 2: The presence of Proxy-Scheme just indicates that the client is asking for this request to be forwarded, and which protocol to use in forwarding (CoAP-over-UDP? CoAP-over-TCP? Even HTTP in a cross proxy?). ad 2:Proxy-Scheme 的存在只是表明客户端正在请求转发这个请求,以及在转发时使用哪种协议(CoAP-over-UDP?CoAP-over-TCP?甚至是交叉代理中的 HTTP? )。 For most proxy cases, you look into the Uri-Host option to decide which next hop to take.对于大多数代理情况,您可以查看 Uri-Host 选项来决定采用哪个下一跳。 The forwarded message contains no Proxy-Scheme any more but only the Uri-* options, exactly as they were in the original request.转发的消息不再包含 Proxy-Scheme,而只包含 Uri-* 选项,与原始请求中的完全一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM