File Coverage

blib/lib/IO/Async/SSLStream.pm
Criterion Covered Total %
statement 11 16 68.7
branch n/a
condition n/a
subroutine 4 5 80.0
pod n/a
total 15 21 71.4


line stmt bran cond sub pod time code
1             # You may distribute under the terms of either the GNU General Public License
2             # or the Artistic License (the same terms as Perl itself)
3             #
4             # (C) Paul Evans, 2010-2023 -- leonerd@leonerd.org.uk
5              
6             package IO::Async::SSLStream 0.25;
7              
8 1     1   1753 use v5.14;
  1         5  
9 1     1   39 use warnings;
  1         2  
  1         106  
10 1     1   9 use base qw( IO::Async::Stream );
  1         3  
  1         1017  
11             IO::Async::Stream->VERSION( '0.59' );
12              
13 1     1   19278 use IO::Async::SSL;
  1         3  
  1         146  
14              
15             =head1 NAME
16              
17             C - read and write buffers around an SSL connection
18              
19             =head1 DESCRIPTION
20              
21             This subclass of L provides support for using an SSL
22             connection, as created by L's C or C
23             extension methods. After one of these methods has provided a socket handle, it
24             should be wrapped in an L object to provide the usual
25             C callback.
26              
27             It provides no extra methods and consumes no extra configuration parameters;
28             treat it the same as a regular C object.
29              
30             See the main L documentation for an example of its use.
31              
32             =cut
33              
34             sub _init
35             {
36 0     0     my $self = shift;
37 0           my ( $params ) = @_;
38              
39 0           $params->{reader} = \&IO::Async::SSL::sslread;
40 0           $params->{writer} = \&IO::Async::SSL::sslwrite;
41              
42 0           $self->SUPER::_init( $params );
43             }
44              
45             =head1 BUGS
46              
47             =over 4
48              
49             =item *
50              
51             Currently, this subclass does not completely handle the C configure
52             option. It is possible for the C call to fail with C
53             and C, indicating that it wishes to read (perhaps to obtain
54             fresh keys from the server). In this case, the subclass will not correctly
55             poll for readability and retry the write operation. This bug does not occur
56             with regular C with C turned off.
57              
58             =back
59              
60             =head1 AUTHOR
61              
62             Paul Evans
63              
64             =cut
65              
66             0x55AA;