Skip to content
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

Half-close clarification needed #1234

Closed
mwelzl opened this issue Sep 4, 2023 · 3 comments
Closed

Half-close clarification needed #1234

mwelzl opened this issue Sep 4, 2023 · 3 comments
Labels
Architecture wontfix This will not be worked on

Comments

@mwelzl
Copy link
Contributor

mwelzl commented Sep 4, 2023

From the INT review by Erik Kline:

S4.1.7

  • What happens if an app wants to half-close without sending
    a message (e.g. accept() or connect() followed by some flavor
    of shutdown())?

Without having read the other documents yet I'm just wondering
how this might be implemented.

@mwelzl
Copy link
Contributor Author

mwelzl commented Sep 5, 2023

This case might become a little awkward in our API (I'm also guessing that this isn't the most common communication pattern?). I think the correct way to do this, as an application, would be to send an empty Message that has the Final property set. However, data doesn't seem to be optional in our Messages... does this need changing?

@mwelzl mwelzl added the discuss label Sep 5, 2023
@britram
Copy link
Contributor

britram commented Sep 7, 2023

IIRC we talked a lot about half-close, and how we don't want to enshrine what is essentially a TCP-specific design artifact (which has been taken to be an actual interface surface in the decades since 1983) into a first-order concept in the interface. i.e. "you can't do half-close" is a feature.

That said, your proposed contortion is correct. :) I always understood "data as non-optional" to mean "you can always send zero octets", so I'm not sure we need to correct that, but that's a weakly-held opinion.

@mwelzl
Copy link
Contributor Author

mwelzl commented Sep 27, 2023

I think that explicitly stating that this is possible for an application creates the assumption that it must be possible, which may limit the flexibility of the system. I.e., a programmer might take it to think, I can send any metadata in the messageContext across by just sending an empty Message, but this might not always work, e.g. when the underlying Connection is really just a stream.

So... it's doable but I think we shouldn't write anything about it. Other thoughts?

@mwelzl mwelzl removed the discuss label Oct 2, 2023
@mwelzl mwelzl added the wontfix This will not be worked on label Oct 17, 2023
@mwelzl mwelzl closed this as completed Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants