[英]How I can set a size of message (PDU) for the Californium server?
How I can set a size of PDU dynamically for Californium
server? 如何为
Californium
服务器动态设置PDU的大小?
Context: 语境:
1) I have a device with implemented coap-client
functionality. 1)我有一台已实现
coap-client
功能的设备。 This device is constrained by RAM
, about 200 free bytes for rx/tx
buffers. 该设备受
RAM
约束,用于rx/tx
缓冲区的空闲字节大约为200。
In the request the device can sent a prefer PDU size. 在请求中,设备可以发送首选的PDU大小。 But I don't understand how to configure server responses with this PDU size.
但是我不明白如何用这种PDU大小配置服务器响应。 Is it possible?
可能吗?
2) Will be work a blockwise-functionality for this case? 2)在这种情况下是否可以按块进行工作?
Ok, I found how to do it. 好的,我找到了怎么做。
It is not a Californium
responsibility. 这不是
Californium
责任。 The management of the PDU-size works via block-wise
option Block2
. PDU大小的管理通过
block-wise
选项Block2
。
See the CoAP block-wise RFC Section 3.1
: 请参阅CoAP逐块RFC
Section 3.1
:
In the second example (Figure 3), the client anticipates the block- wise transfer (eg, because of a size indication in the link-format description [RFC6690]) and sends a block size proposal.
在第二个示例(图3)中,客户端将进行逐块传输(例如,由于链接格式描述[RFC6690]中的大小指示),并发送块大小建议。 All ACK messages except for the last carry 64 bytes of payload;
除最后一个消息外,所有ACK消息均携带64字节有效载荷; the last one carries between 1 and 64 bytes.
最后一个携带1到64个字节。
Client Server
| |
| CON [MID=1234], GET, /status, 2:0/0/64 ------> |
| |
| <------ ACK [MID=1234], 2.05 Content, 2:0/1/64 |
| |
| CON [MID=1235], GET, /status, 2:1/0/64 ------> |
| |
| <------ ACK [MID=1235], 2.05 Content, 2:1/1/64 |
: :
: ... :
: :
| CON [MID=1238], GET, /status, 2:4/0/64 ------> |
| |
| <------ ACK [MID=1238], 2.05 Content, 2:4/1/64 |
| |
| CON [MID=1239], GET, /status, 2:5/0/64 ------> |
| |
| <------ ACK [MID=1239], 2.05 Content, 2:5/0/64 |
Figure 3: Block-Wise GET with Early Negotiation
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.