Repository navigation
Commit f59e4d4
committed
ssl: update rdoc for SSLSocket#pending and #wait_readable
Clarify how they (do not) interact with read buffers.
SSLSocket#pending corresponds to SSL_pending(). It reports data that is
already processed and is immediately available to read from the OpenSSL
library's internal buffer.
SSLSocket#wait_readable does not check for buffered data, either in the
OpenSSL library or in OpenSSL::Buffering, so it may block even when
data is already available to read.
This is different from IO#wait_readable. I considered changing
SSLSocket#wait_readable to check these buffers, but rejected it because
it is also used when the caller specifically needs to wait for new
records from the peer, particularly after SSLSocket#write_nonblock
returns :wait_readable.1 parent ed948ea commit f59e4d4
2 files changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2440 | 2440 | | |
2441 | 2441 | | |
2442 | 2442 | | |
2443 | | - | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
2444 | 2451 | | |
2445 | 2452 | | |
2446 | 2453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
226 | 230 | | |
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
230 | 238 | | |
231 | 239 | | |
232 | 240 | | |
233 | 241 | | |
| 242 | + | |
234 | 243 | | |
235 | 244 | | |
236 | 245 | | |
| |||
0 commit comments