IO::As...Stream(3pm)
β¨ IO::As...Stream(3pm) β¨
okay bestie, this one lives in the User Contributed Perl Documentation section, and it's a lil baby page but it's a useful lil baby page, so let's go π
πΈ NAME πΈ
IO::Async::SSLStream β read and write buffers around an SSL connection π¦
π DESCRIPTION π
okay so. This is a subclass of IO::Async::Stream, and what it does is give you support for using an SSL connection β specifically the kind that gets created by IO::Async::SSL's SSL_connect or SSL_listen extension methods β¨
Here's the flow, bestie: once one of those methods hands you a socket handle, you wrap that handle up in an IO::Async::SSLStream object. That's the whole move. And why? So you get the usual on_read callback working like you'd expect π
And here's the lowkey iconic part: it provides no extra methods and consumes no extra configuration parameters. None. Zero. Nada. So just treat it exactly like a regular IO::Async::Stream object, because that's literally what it is, just with SSL energy π
fr fr, go check the main IO::Async::SSL documentation β there's an example of its use in there and it'll make everything click π
π BUGS π
okay so here's the part where we keep it real:
- Currently, this subclass does not completely handle the
autoflushconfigure option. π Here's why that's a problem: it's possible for theSSL_write(3ssl)call to fail withEAGAINandSSL_WANT_READ, which is the call basically saying "hey, I actually wanna read right now" β maybe it needs fresh keys from the server or whatever. And in that case, the subclass will not correctly poll for readability and retry the write operation. π So the write just... doesn't get retried properly. This bug does not occur with regularwritewhenautoflushis turned off, so it's specific to this situation, no cap.
π«Ά AUTHOR π«Ά
Paul Evans <leonerd@leonerd.org.uk> β king behavior, honestly π
and that's the whole page, bestie!! this doc is from perl v5.36.0, dated 2023-09-29, and it was brought to you by the User Contributed Perl Documentation girlies π go forth and wrap those sockets, you got this π
π¦ where this page comes from
- debian trixie: libio-async-ssl-perl 0.25-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libio-async-ssl-perl 0.25-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libio-async-ssl-perl 0.25-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libio-async-ssl-perl 0.25-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms