Repository navigation
[merge] v0.5.0 from phase-5 - #7
Merged
Merged
Conversation
- Pin tinclib-protocol v0.5 (8e25875); version 0.5.0 - POST/PUT/PATCH/DELETE/HEAD; the body is streamed by BODY_WRITE from the app's pointer, and the write loop is the connect poll - New TINC_SENDING state; RESPONDED ends the upload early - tinc_header() over HDR_GET, paging long values and re-fetching a pending body chunk; tinc::header and the new enums in tinclib.hpp - Fake board handles BODY_WRITE and HDR_GET; golden POST test, upload, early-response, method and header tests - README, AGENTS.md and the size example updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves tinclib to protocol v0.5: request bodies, more methods and response headers.
v0.5(8e25875). Upstream has nov0.5.0tag yet, though its CHANGELOG says releases are taggedvMAJOR.MINOR.0.TINC_ERR_UNSUPPORTED_METHODis now only for values outsidetinc_method_t.tinc_poll()streams the body withBODY_WRITEstraight from the app's pointer, as much as the board takes per write. As the protocol intends, these writes are also the connect poll, so there's no REQ_STATUS until the upload is done.TINC_SENDINGonce the board starts taking bytes. An https upload showsTINC_CONNECTING, neverTINC_SECURING.RESPONDED(the server answered early, e.g. 413) stops the upload, and the response is read as usual.tinc_header(name, out, cap)overHDR_GET. It pages through long values and returns the full length, or -1. The reply lands in the shared frame buffer, so a pending body chunk is fetched again (the same offset re-delivers it): one extra round trip mid-body.tinc::header, the new methods andState::Sending.BODY_WRITEandHDR_GET.size-checkmin 4,047 / full 9,791 bytes (the full example now uses POST andtinc_header).size_cppis 9,844 bytes.Not used:
INFO(display only, TINCLIBC's job),HDR_GET'sindex(always 0) andTRUNCflag, and upload progress beyondTINC_SENDING.Not yet run against a board: it needs firmware on protocol 0.5.