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

Missing shutdown, close_write and close_read. #609

Closed
ioquatix opened this issue Mar 19, 2023 · 1 comment · Fixed by #743
Closed

Missing shutdown, close_write and close_read. #609

ioquatix opened this issue Mar 19, 2023 · 1 comment · Fixed by #743

Comments

@ioquatix
Copy link
Member

These APIs can be quite important for certain types of servers.

I started trying to implement it and then realised how tricky it is to correctly support flags.

      def close_write
        stop
      end

      def shutdown(flags)
        if flags == ???
        stop
        to_io.shutdown(flags)
      end

Since the flags can be a symbol, a string, etc.

Also, I don't think SSLSocket can support close_read but I'll experiment.

@rhenium
Copy link
Member

rhenium commented Jun 6, 2023

TLS <= 1.2 doesn't support a half-closed state: https://datatracker.ietf.org/doc/html/rfc5246#section-7.2.1

It may be possible in TLS 1.3: https://datatracker.ietf.org/doc/html/rfc8446#section-6.1

I don't know how OpenSSL is handling it in TLS 1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants