Skip to content

Implement --close #73

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Implement --close #73

wants to merge 2 commits into from

Conversation

eminence
Copy link

This option causes the sending side to not send any data and instead immeditally send an EOF. This can be useful when you are only interested in sending data in one direction.

Closes #10

@eminence
Copy link
Author

bikeshed: the --close name was picked based on this comment but maybe there's a better name for this argument.

@n0bot n0bot bot added this to iroh Jul 28, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Jul 28, 2025
@rklaehn
Copy link
Contributor

rklaehn commented Jul 28, 2025

Hm, --close is confusing I think. --one-way is better, but it also is not clear which way, given that the listener could send or receive data. How about something like --recv-only or --send-only?

@dignifiedquire
Copy link
Contributor

maybe --once ?

@eminence
Copy link
Author

--once also feels confusing to me.

Is --close-stdin any clearer?

--recv-only is also nice

@rklaehn
Copy link
Contributor

rklaehn commented Jul 29, 2025

I think --recv-only is nicest. It leaves the door open for --send-only if we ever need it, and can be used on both sides if ever needed.

This option causes the sending side to not send any data and instead
immeditally send an EOF.  This can be useful when you are only
interested in sending data in one direction.

Closes n0-computer#10
src/main.rs Outdated
@@ -323,7 +331,11 @@ async fn listen_stdio(args: ListenArgs) -> Result<()> {
snafu::ensure_whatever!(buf == dumbpipe::HANDSHAKE, "invalid handshake");
}
tracing::info!("forwarding stdin/stdout to {}", remote_node_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe update this log line accordingly as well?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good suggestion, thanks. the latest commit updates this message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

dumbpipe connect does not close on EOF
3 participants