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

Expose wait_readable and wait_writable in SSLSocket #408

Open
ioquatix opened this issue Nov 16, 2020 · 2 comments
Open

Expose wait_readable and wait_writable in SSLSocket #408

ioquatix opened this issue Nov 16, 2020 · 2 comments
Assignees

Comments

@ioquatix
Copy link
Member

It seems like we don't expose this.

It was a problem for this PR: redis/redis-rb#960

User should be able to expect to write:

io.wait_readable(timeout)
io.wait_writable(timeout)

But it doesn't seem to be working for SSLSocket.

It should be relatively trivial to implement, something like this:

        def wait_readable(timeout = nil)
          to_io.wait_readable(timeout)
        end

        def wait_writable(timeout = nil)
          to_io.wait_writable(timeout)
        end

Any thoughts?

@rhenium
Copy link
Member

rhenium commented Feb 17, 2021

Agreed, that would be a nice addition. Other methods from io/wait (#nread - can simply return 0, #ready?, #wait, #wait_priority) can also be implemented in a similar way.

@djberg96
Copy link

Has this still not happened yet?

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

No branches or pull requests

3 participants