X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FIPC%2FMorseSignals.pm;h=2da548f498d4d98f6402c039ea1afc6415cb6088;hb=21ecaad0abc3afdc379efa498a0fdad4ff0e2000;hp=4433afdbecb275b1f6db9cf923ec59ec6dc6df2a;hpb=90d2b0db8abb64d3c16d674091938f8c65e9caac;p=perl%2Fmodules%2FIPC-MorseSignals.git diff --git a/lib/IPC/MorseSignals.pm b/lib/IPC/MorseSignals.pm index 4433afd..2da548f 100644 --- a/lib/IPC/MorseSignals.pm +++ b/lib/IPC/MorseSignals.pm @@ -9,18 +9,18 @@ IPC::MorseSignals - Communicate between processes with Morse signals. =head1 VERSION -Version 0.12 +Version 0.16 =cut -our $VERSION = '0.12'; +our $VERSION = '0.16'; =head1 SYNOPSIS # In the sender process use IPC::MorseSignals::Emitter; - my $deuce = new IPC::MorseSignals::Emitter speed => 1024; + my $deuce = IPC::MorseSignals::Emitter->new(speed => 1024); $deuce->post('HLAGH') for 1 .. 3; $deuce->send($pid); @@ -30,24 +30,34 @@ our $VERSION = '0.12'; use IPC::MorseSignals::Receiver; local %SIG; - my $pants = new IPC::MorseSignals::Receiver \%SIG, done => sub { + my $pants = IPC::MorseSignals::Receiver->new(\%SIG, done => sub { print STDERR "GOT $_[1]\n"; - }; + }); =head1 DESCRIPTION -This module implements a rare form of IPC by sending Morse-like signals through C and C. Both of those signals are used, so you won't be able to keep them for something else when you use this module. +This module implements a rare form of IPC by sending Morse-like signals through C and C. +Both of those signals are used, so you won't be able to keep them for something else when you use this module. =over 4 -=item L is a base class for emitters ; +=item * -=item L is a base class for receivers. +L is a base class for emitters ; + +=item * + +L is a base class for receivers. =back But, seriously, use something else for your IPC. :) +=head1 CAVEATS + +When the same signal is sent several times in a row to a process, the POSIX standard does not guarantee that the relevant signal handler will be called for each of the notifications. +This will result in malformed messages if the transfer speed is so high that the operating system does not have the time to call the signal handler for each bit. + =head1 DEPENDENCIES You need the complete L distribution. @@ -68,11 +78,12 @@ For truly useful IPC, search for shared memory, pipes and semaphores. Vincent Pit, C<< >>, L. -You can contact me by mail or on #perl @ FreeNode (vincent or Prof_Vince). +You can contact me by mail or on C (vincent). =head1 BUGS -Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. +Please report any bugs or feature requests to C, or through the web interface at L. +I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT @@ -86,7 +97,7 @@ Thanks for the inspiration, mofino ! I hope this module will fill all your IPC n =head1 COPYRIGHT & LICENSE -Copyright 2007-2008 Vincent Pit, all rights reserved. +Copyright 2007,2008,2013 Vincent Pit, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.