]> git.meshlink.io Git - meshlink/commit
Implement MESHLINK_CHANNEL_FRAMED.
authorGuus Sliepen <guus@meshlink.io>
Sun, 24 May 2020 22:11:10 +0000 (00:11 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sun, 24 May 2020 22:55:54 +0000 (00:55 +0200)
commitd90d88adfbfc340e8eb473e0265f2741bf3f40a4
treedf1e8a43b283e655485f35079ca8d037a10dff30
parent36a7403d3ab239a03c4085fa46f0df2127394a95
Implement MESHLINK_CHANNEL_FRAMED.

Both UDP and TCP style channels can now be set to use message framing.
Allowed message sizes are 0 to 65535 bytes.

For TCP, this means every meshlink_channel_send() will cause exactly one
receive callback on the other end, with the same size as the sent data.

For UDP style channels, this was already the normal behaviour (absent
packet loss), but with framing enabled UTCP will now concatenate multiple
messages in a single packet if possible.
src/meshlink++.h
src/meshlink.c
src/meshlink.h
src/meshlink.sym
src/utcp.c
src/utcp.h
src/utcp_priv.h
test/Makefile.am
test/channels-framed.c [new file with mode: 0644]
test/channels-udp-framed.c [new file with mode: 0644]
test/channels-udp.c