L
Loofort
Hello all.
I'm developing perl http and ftp clients and want to upload it to
CPAN. It's my very first time. http://perldoc.perl.org/perlnewmod.html
told that it is good idea to discuss module with folk before upload.
So please point me to the right direction if I'm doing something
wrong. Here is short description :
- it works under linux
- based on EV and Coro
- support http/1.1, https, socks5
- several times faster than Coro::LWP
I think to prefix packages with "CTX" - meaning "context" since http
(and specially ftp) works in context - pass the cookies, understand
relative links, keep alive connections etc.
Here is file distribution:
CTX/
HTTP.pm - CTX::HTTP - based on CTX::EV::HTTP and used Coro
FTP.pm - CTX::FTP (similar to CTX::HTTP)
EV/
HTTP.pm - CTX::EV::HTTP based on EV event loop, get
CTX::EV::Socket (or Socks5 ) as connection constructor (cc)
FTP.pm - CTX::EV::FTP similar to CTX::EV::HTTP
FTP/
Command.pm
Data.pm
Socket.pm - CTX::EV::Socket - cc
Socks5.pm - CTX::EV::Socks5, get CTX::EV::Socket or
CTX::EV::Socks5 as cc
The simple example bellow makes 100 requests simultaneously :
use strict;
use CTX::HTTP;
async {
my $http = CTX::HTTP->new();
my $resp = $http->get('http://www.example.com/');
print "response code: ".$resp->code."\n";
} foreach (1..100);
EV::loop;
I'm developing perl http and ftp clients and want to upload it to
CPAN. It's my very first time. http://perldoc.perl.org/perlnewmod.html
told that it is good idea to discuss module with folk before upload.
So please point me to the right direction if I'm doing something
wrong. Here is short description :
- it works under linux
- based on EV and Coro
- support http/1.1, https, socks5
- several times faster than Coro::LWP
I think to prefix packages with "CTX" - meaning "context" since http
(and specially ftp) works in context - pass the cookies, understand
relative links, keep alive connections etc.
Here is file distribution:
CTX/
HTTP.pm - CTX::HTTP - based on CTX::EV::HTTP and used Coro
FTP.pm - CTX::FTP (similar to CTX::HTTP)
EV/
HTTP.pm - CTX::EV::HTTP based on EV event loop, get
CTX::EV::Socket (or Socks5 ) as connection constructor (cc)
FTP.pm - CTX::EV::FTP similar to CTX::EV::HTTP
FTP/
Command.pm
Data.pm
Socket.pm - CTX::EV::Socket - cc
Socks5.pm - CTX::EV::Socks5, get CTX::EV::Socket or
CTX::EV::Socks5 as cc
The simple example bellow makes 100 requests simultaneously :
use strict;
use CTX::HTTP;
async {
my $http = CTX::HTTP->new();
my $resp = $http->get('http://www.example.com/');
print "response code: ".$resp->code."\n";
} foreach (1..100);
EV::loop;