Device::Velleman::K8055::Server - IPCS Server for the K8055 Device
use Device::Velleman::K8055::Server; my $server = Device::Velleman::K8055::Server->new();
Sets up a server that handles all communication with the K8055 device. Communicates with clients through shared memory.
Example of a daemon that initiates the server:
use Device::Velleman::K8055::Server; use Proc::Daemon; use Tie::Hash; $SIG{HUP} = 'shutdown'; foreach my $argnum (0 .. $#ARGV) { if( $ARGV[$argnum] eq '--debug' ) { $debug=1; } if( $ARGV[$argnum] eq '--nodaemon' ) { $nodaemon=1; } if( $ARGV[$argnum] eq '--server' ) { $server=1; } } if($server) { print "Running Server\n"; server(); } sub server { #Run as Daemon unless -nodaemon passed. unless( $nodaemon ) { print "Running as daemon.\n"; Proc::Daemon::Init; } my $server = K8055::Server->new(); $server->run; } sub shutdown { $server->cleanup(); exit; }
Many.
David Peters CPAN ID: DAVIDP davidp@electronf.com http://www.electronf.com
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
Device::Velleman::K8055::Client, Device::Velleman::libk8055, perl(1).
To install Device::Velleman::K8055::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::Velleman::K8055::Server
CPAN shell
perl -MCPAN -e shell install Device::Velleman::K8055::Server
For more information on module installation, please visit the detailed CPAN module installation guide.