简体   繁体   中英

Regarding CoAP Client proxy funtionality

I'm developing CoAP Client proxy funtionailty. But, I'm confused the spec and how it works. What I'm confused as the following:

  1. Proxy-URI option

    1.1 Which coap server can be connected if Proxy-URI option is setup?

    1.2 Should CoAP request message include URI-* options if there is Proxy-URI option? As far as I know, the URI-* options should be included. But, the URI-* options are skipped in libcoap code.

  2. Proxy-Scheme option

    2.1 How to construct URI-* options if proxy-scheme option is present? If it's present, normal URI-* options should be skipped or not?

ad 1.2: The Proxy-Uri and the other Uri-* options are mutually exclusive. There can be either a Proxy-Uri or any combination of Uri-* options. Think of the Proxy-Uri option as an alternative representation of (Proxy-Scheme, Uri-Host, Uri-Port, ...), and whenever possible avoid using 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?). For most proxy cases, you look into the Uri-Host option to decide which next hop to take. The forwarded message contains no Proxy-Scheme any more but only the Uri-* options, exactly as they were in the original request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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