diff -r d6f681329542 -r 7ccc679ac5db lib/Quancom/Test/Server.pm --- a/lib/Quancom/Test/Server.pm Sun Jan 04 23:44:45 2009 +0100 +++ b/lib/Quancom/Test/Server.pm Mon Jan 05 21:44:56 2009 +0100 @@ -4,6 +4,24 @@ # Quancom.pm module and should work like the real USB-OPTO device of # Quancom. +# Quancom test/simulator server +# Copyright (C) 2008 Heiko Schlittermann +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Heiko Schlittermann + use strict; use warnings; use Carp; @@ -166,3 +184,34 @@ } 1; + +__END__ + +=head1 NAME + +Quancom::Test::Server + +=head1 SYNOPSIS + + use Quancom::Test::Server; + + my $server = new Quancom::Test::Server "/tmp/socket"; + $server->run(); + +=head1 METHODS + +=over + +=item constructor B( I<$address> ) + +This creates a new server on the I<$address>. The I<$address> may be one +of the following: + + "-" server communications on STDIN/STDOUT + [address:]port server binds to port I on address I
+ or 0.0.0.0 + filename server creates and binds to the named socket + file (the file gets created by the server and + will be removed afterwards) + +=back