Asynchat

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

        "Module::Build" => "0.3601",
        "Storable" => 0,
        "Test::Fatal" => 0,
        "Test::More" => "0.88",
        "utf8" => 0
    },
    #"c_source" => "c",
    #"configure_requires" => {
    #  "Module::Build" => "0.3601"
    #},
    "dist_abstract" => "Builds on Asyncore, makes easier to handle client and server asynchronous communication",
    "dist_author" => [
    "Sebastiano Piccoli <sebastiano.piccoli\@gmail.com>"
    ],
    "dist_name" => "Asynchat",
    "dist_version" => "0.01",
    "license" => "lgpl",
    "module_name" => "Asynchat",
    "recommends" => {},
    "recursive_test_files" => 1,
    "requires" => {

META.yml  view on Meta::CPAN

---
abstract: 'Builds on Asyncore, makes easier to handle client and server asynchronous communication'
author:
  - 'Sebastiano Piccoli <sebastiano.piccoli@gmail.com>'
build_requires:
  Module::Build: 0.3601
  Storable: 0
  Test::Fatal: 0
  Test::More: 0.88
  utf8: 0
configure_requires:
  Module::Build: 0.36

lib/Asynchat.pm  view on Meta::CPAN

    
    my $channel = Subclass->new($addr, $port);
    
    $channel->handle_connect( ... )
    $channel->collect_incoming_data( ... );
    $channel->found_terminator( ... )

 
=head1 DESCRIPTION

Asynchat builds on Asyncore, simplifying asynchronous clients and servers and making it easier to handle protocols whose elements are terminated by arbitrary strings, or are of variable length. 
 
Asyncore is a basic infrastructure for asyncronous socket programming. It provides an implementation of "reactive socket" and it provides hooks for handling events. Code must be written into these hooks (handlers).
 
Asynchat is intended as an abstract class. Override collect_incoming_data() and found_terminator() in a subclass to provide the implementation of the protocol you are writing.
 
See the folder <i>script</i> for a complete example on the correct use of this module.
 

=head1 METHODS



( run in 0.447 second using v1.01-cache-2.11-cpan-0d8aa00de5b )