Open
Conversation
Closed
Replace the synchronous blocking model (uv_run per operation) with an async callback-driven architecture that integrates with the Acton RTS event loop. The Client actor now exposes write()/close() methods and delivers data via on_receive, on_error, and on_remote_close callbacks instead of the previous get/set_payload + send_payload pattern. Key changes: - Use get_uv_loop() (RTS loop) instead of private per-client uv loops - Simplify C state machine: AUTH → AUTH_KBDINT → CHANNEL_OPEN → REQUEST_TYPE → READY - Add keyboard-interactive auth fallback when password auth is denied - Add buffered async writes with partial-write handling - Make password and subsystem optional; support shell or subsystem channels - Remove fallthrough between states so each transition gets its own poll cycle - Rewrite main actor with a NETCONF state machine example - Add Build.act with libssh zig dependency Signed-off-by: Antonio Prcela <antonio.prcela@sartura.hr>
Collaborator
Author
|
Build.act currently points to a fork: https://github.com/precla/libssh/archive/refs/heads/zig-build.tar.gz Once actonlang/libssh/pull/3 is merged, it can point to it instead of the fork |
Collaborator
Author
|
Changes in latest commit. Redesign SSH Client to async event-driven API using RTS event loop Replace the synchronous blocking model (uv_run per operation) with an Key changes:
Requires latest actonlang libssh build: actonlang/libssh#3 |
Signed-off-by: Antonio Prcela <antonio.prcela@sartura.hr>
Signed-off-by: Antonio Prcela <antonio.prcela@sartura.hr>
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.
stratoweave/stratoweave#5
This solution uses libuv's polls to handle incoming data.Compared to the solution in MR1 , it can handle buffers of smaller size:#define BUF_SIZE 512can be any value. Since it will append the response until it's EOF. THe MR1 solution had the issue that it would only process once and if something doesn't fit in the predefined buffer, then it would just drop it.Another change is that this solution uses only actorClientand no moreChannelactor.The Client does everything: setup the connection (ssh or netconf), send a payload and get the response
See comment: #2 (comment)