mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-26 12:56:10 +00:00
For stream-based protocols (TCP), adding less data than requested ("short write") is generally not a problem - the rest of data can be sent in the next packet. So, make net_pkt_append() return length of written data instead of just bool flag, which makes it closer to the behavior of POSIX send()/write() calls. There're many users of older net_pkt_append() in the codebase however, so net_pkt_append_all() convenience function is added which keeps returning a boolean flag. All current users were converted to this function, except for two: samples/net/http_server/src/ssl_utils.c samples/net/mbedtls_sslclient/src/tcp.c Both are related to TLS and implement mbedTLS "tx callback", which follows POSIX short-write semantics. Both cases also had a code to workaround previous boolean-only behavior of net_pkt_append() - after calling it, they measured length of the actual data added (but only in case of successful return of net_pkt_append(), so that didn't really help). So, these 2 cases are already improved. Jira: ZEP-1984 Change-Id: Ibaf7c029b15e91b516d73dab3612eed190ee982b Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org> |
||
---|---|---|
.. | ||
arp.h | ||
bt.h | ||
buf.h | ||
dhcpv4.h | ||
dns_resolve.h | ||
ethernet.h | ||
http_parser.h | ||
http.h | ||
ieee802154_radio.h | ||
ieee802154.h | ||
mii.h | ||
mqtt_types.h | ||
mqtt.h | ||
net_context.h | ||
net_core.h | ||
net_event.h | ||
net_if.h | ||
net_ip.h | ||
net_l2.h | ||
net_linkaddr.h | ||
net_mgmt.h | ||
net_offload.h | ||
net_pkt.h | ||
net_stats.h | ||
trickle.h | ||
zoap_link_format.h | ||
zoap.h |