Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] Do you use CoapClient API?

Hi Achim

It was late, but luckily the example is not normative ;)
Yes, "/obs" was meant to be the Uri-Path and I accidently patched in the Observe value there, not in its own Option.
Clients may use whatever Token they want. They could even reuse the Token of the original Observe registration, if the client handles it correctly. Maybe the example should show at least the two "normal" cases: random tokens and a different but same token for the remaining blocks.

Polished once more (thanks for your update!):

CLIENT                                                     SERVER
  |                                                          |
  | ------- CON [MID=4711, T=0xBEEF], GET /res, Obs:0 -----> | Registration
  |
<-- ACK [MID=4711, T=0xBEEF], 2.05, Obs:101, 2:0/1/64 -- |
  |                                                          |
 ...                                                        ...

  |                                                          |
 
| <-- CON [MID=1234, T=0xBEEF], 2.05, Obs:665, 2:0/1/64 -- |
  | ------- ACK [MID=1234], 0.00 --------------------------> |

  |                                                          |
 
| ------- CON [MID=4712, T=0xDE01], GET
/res, 2:1/0/64 --> |
  | <------ ACK [MID=4712, T=0xDE01], 2.05, 2:1/1/64 ------- |

  |                                                          |
 
| ------- CON [MID=4713, T=0x02AD], GET
/res, 2:2/0/64 --> | Token can be random
  | <------ ACK [MID=4713, T=0x02AD], 2.05, 2:2/1/64 ------- | Not finished !

  |                                                          |
 
| <-- CON [MID=1235, T=0xBEEF], 2.05, Obs:666, 2:0/1/64 -- | New notification, higher Obs number:
  | ------- ACK [MID=1235], 0.00 --------------------------> | Cancel old blockwise transfer

  |                                                          |
 
| ------- CON [MID=4714, T=0xFEFE], GET /res, 2:1/0/64 --> | Continue only the new blockwise transfer
  | <------ ACK [MID=4714, T=0xFEFE], 2.05, 2:1/1/64 ------- |

  |                                                          |
  | <-- CON [MID=1233, T=0xBEEF], 2.05, Obs:664, 2:0/1/64 -- | New notification, lower Obs number:
  | ------- ACK [MID=1233], 0.00 --------------------------> | Ignore

  |                                                          |
 
| ------- CON [MID=4715, T=
0xFEFE], GET /res, 2:2/0/64 --> | Token may also be the same
  | <------ ACK [MID=4715, T=
0xFEFE], 2.05, 2:2/1/64 ------- | ETag: 0xB0B0
  |                                                          |
 
| ------- CON [MID=4716, T=0xFEFE], GET /res, 2:3/0/64 --> |
  | <------ ACK [MID=4716, T=0xFEFE], 2.05, 2:3/1/64 ------- | ETag: 0xB1B1 -> wrong representation
  |                                                          | Cancel blockwise transfer
 ...                                                        ...

I think I will include this in draft-ietf-lwig-coap (once I got the time).

Ciao
Matthias



Back to the top