Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    IO::NonBlocking 1.035

    Download button

    No screenshots available
    Downloads: 311  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Komtanoo Pinpimai | More programs
    Perl Artistic License / FREE
    May 30th, 2009, 22:56 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    IO::NonBlocking description

    Object-oriented interface to non-blocking IO server implementation.

    IO::NonBlocking is an object-oriented interface to non-blocking IO server implementation.

    SYNOPSIS

     package FooServer;
     use IO::NonBlocking;
     use strict;
     use vars qw (@ISA);
     @ISA=qw(IO::NonBlocking);

     sub new {
     my $class=ref($_[0]) || $_[0];
     my $self=IO::NonBlocking->new(
     {
     server_name => 'FooServer',
     port => 52721,
     timeout => 300,
     piddir => '/tmp'
     }
     );

     bless $self,$class;
     }

     sub onClientConnected {
     my $self=shift;
     my $client=shift;
     
     print $self->getip($client),":",$self->getport($client),"
    ";
     }

     sub onClientDisconnected {
     my $self=shift;
     my $client=shift;
     
     print "Disconnected
    ";
     }

     1;

     package main;
     my $obj=FooServer->new;
     $obj->start;


    IO::NonBlocking is a non-blocking IO server style, runable on non-blocking IO capable OS -- most Unix and it's cloned platforms.

    The non-blocking server engine is built, basing on a page of codes of the Tom Christiansen's Perl Classic Cook Book.

    If you have some experiences with IO::Multiplex, you'll see that the module has poor efficiency. Since IO-multiplexing blocks all clients when one sends his data slowly. At first, I did appreciate the module much, but when user increases, everything is slowed down.

    After that, I had tried many fruitless improvement to the module and they didn't work at all. I'd realized that there weren't exist such a non-blocking server module on CPAN, after mining for many nights.

    At last, I did copy my core code from the CookBook and it worked like charm at my first glance, nevertheless the code has some bugs that make my server crash, however, I've fixed it and added many useful features to decide to release it as a module to CPAN.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    non-blocking IO | object-oriented interface | Perl module | Perl | non-blocking | IO

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM