-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interactive standard stream processing. #63
Comments
Hey! Just checking, but you're essentially looking for a bidirectional stream right? Writes are going to |
I'm thinking of mimicking the NIOAsyncChannel APIs |
Ping @vsevolod-volkov |
I am very sorry for my disappear. I had trouble with my discord login then switched to other tasks and forgot. I still very interested with new async API in citadel. Just tried to connect you in Discord. |
@vsevolod-volkov I probably rejected your friend request because it was missing a message. I do tend to get some spam as well. Can you reach out again, or send a single message in the Citadel channel I have? |
Are you in the orlandos-nl discord server, linked in the Citadel README? https://discord.com/invite/H6799jh |
Yes, now I am there. But still fighting with discord client... |
No worries, I'm fighting with my network right now |
try await client.withRunningExectable(
"/path/to/executable",
"--flag",
"--key", "value"
) { inbound, outbound in
// outbound allows clients to write to `stdin` on the server
try await outbound.write(...)
// Inbound represents the incoming stream. I.E. `stdout` and `stderr` that the server's process emits
for try await message in inbound {
switch message {
case .stdout(let buffer):
() // you've received data on stdout
case .stderr(let buffer):
() // you've received data on stderr
}
}
} |
Hi, @Joannis! Are there any news here? ;-) |
Not much, I've been busy with Hummingbird 2 recently, and am currently on vacation |
There is requirement in our project to catch script output it prints out to its STDOUT/STDERR and send response back to STDIN when it prompts for it.
Any solution allowing to catch STDOUT/STDERR stream output in realtime in couple with ability to immediately send data to ssh STDIN will satisfy us.
For now we implemented alternative ssh interaction based on low-level swift Process class. We transferring ssh command with arguments as Process.arguments then interacting with it like any other child UNIX process.
We found this solution horrible especially in contrast with nice Citadel interface and still use Citadel for sftp, so we very appreciate you to implement real-time interaction in citadel.
The text was updated successfully, but these errors were encountered: