IO-Lambda
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
VERSION_FROM => 'lib/IO/Lambda.pm',
LICENSE => 'perl',
PREREQ_PM => {
'Net::DNS' => 1.05,
'Storable' => 0,
'LWP' => 0,
'URI' => 0,
'Sub::Name' => 0,
'Scalar::Util' => 0,
'Time::HiRes' => 0,
# 'IO::Socket::SSL' => 0, # for HTTPS
# 'SNMP' => 0, # for IO::Lambda::SNMP
# 'AnyEvent' => 0, # for alternative event loop
# 'Authen::NTLM' => 1.05, # for HTTP authentication
# 'DBI' => 0, # for IO::Lambda::DBI
# 'threads' => 0, # for IO::Lambda::Threads
},
clean => { FILES => 't/online.enabled' },
META_MERGE => {
resources => {
repository => 'https://github.com/dk/IO-Lambda'
lib/IO/Lambda.pm view on Meta::CPAN
L<IO::Lambda::Signal> - POSIX signals.
=item *
L<IO::Lambda::Socket> - lambda versions of C<connect>, C<accept> etc.
=item *
L<IO::Lambda::HTTP> - implementation of HTTP and HTTPS protocols. HTTPS
requires L<IO::Socket::SSL>, NTLM/Negotiate authentication requires
L<Authen::NTLM> modules (not marked as dependencies).
=item *
L<IO::Lambda::DNS> - asynchronous domain name resolver.
=item *
L<IO::Lambda::SNMP> - SNMP requests lambda style. Requires L<SNMP>.
lib/IO/Lambda/HTTP/HTTPS.pm view on Meta::CPAN
# $Id: HTTPS.pm,v 1.14 2012/03/13 03:23:24 dk Exp $
package IO::Lambda::HTTP::HTTPS;
use strict;
use warnings;
use Socket;
use IO::Socket::SSL;
use IO::Lambda qw(:lambda :stream :dev :constants);
use Errno qw(EWOULDBLOCK EAGAIN);
our $DEBUG = $IO::Lambda::DEBUG{https};
# check for SSL error condition, wait for read or write if necessary
# return ioresult
sub https_wrapper
{
my ($sock, $deadline) = @_;
lib/IO/Lambda/HTTP/HTTPS.pm view on Meta::CPAN
(defined($bytes) ? "$bytes bytes" : "error $error"),
"\n" if $DEBUG;
return $bytes, $error;
}
}
}
sub https_connect
{
my ($sock, $host, $port, $deadline) = @_;
my $ssl_ok = IO::Socket::SSL-> start_SSL( $sock,
SSL_startHandshake => 0,
SSL_verify_mode => SSL_VERIFY_NONE(),
PeerAddr => $host,
PeerPort => $port,
Blocking => 0,
);
return lambda { (undef, $SSL_ERROR ) } unless $ssl_ok;
lambda {
# emulate sysreader/syswriter to be able to
lib/IO/Lambda/HTTP/HTTPS.pm view on Meta::CPAN
=pod
=head1 NAME
IO::Lambda::HTTP::HTTPS - https requests lambda style
=head1 DESCRIPTION
The module is used internally by L<IO::Lambda::HTTP>, and is a separate module
for the sake of installations that contain C<IO::Socket::SSL> and
C<Net::SSLeay> prerequisite modules. The module is not to be used directly.
=head1 SEE ALSO
L<IO::Lambda::HTTP>
=head1 AUTHOR
Dmitry Karasik, E<lt>dmitry@karasik.eu.orgE<gt>.
( run in 1.156 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )