openssl icon indicating copy to clipboard operation
openssl copied to clipboard

Expose `wait_readable` and `wait_writable` in SSLSocket

Open ioquatix opened this issue 4 years ago • 2 comments

It seems like we don't expose this.

It was a problem for this PR: https://github.com/redis/redis-rb/pull/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?

ioquatix avatar Nov 16 '20 23:11 ioquatix

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.

rhenium avatar Feb 17 '21 10:02 rhenium

Has this still not happened yet?

djberg96 avatar Mar 17 '22 09:03 djberg96