This is an automated email from the git hooks/post-receive script. intrigeri pushed a commit to branch experimental in repository libnet-dbus-perl.
commit 857bb701709091c2064c24dba4ac56351415f50b Author: Daniel P. Berrange <[email protected]> Date: Mon Aug 9 21:52:22 2004 +0000 Two examples --- examples/client.pl | 17 +++++++++++++++++ examples/server.pl | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/examples/client.pl b/examples/client.pl new file mode 100644 index 0000000..63c7564 --- /dev/null +++ b/examples/client.pl @@ -0,0 +1,17 @@ +#!/usr/bin/perl -w + +use strict; + +$ENV{DBUS_VERBOSE} = 1; + +use DBus::Connection; +use DBus::Reactor; + +my $con = DBus::Connection->new(address => "unix:path=/tmp/dbus-perl-test"); +my $reactor = DBus::Reactor->new(); +$reactor->manage($con); +$reactor->run(); + +$con->disconnect; + +exit 0; diff --git a/examples/server.pl b/examples/server.pl new file mode 100644 index 0000000..ed620d8 --- /dev/null +++ b/examples/server.pl @@ -0,0 +1,35 @@ +#!/usr/bin/perl -w + +use strict; + +$ENV{DBUS_VERBOSE} = 1; + +use DBus::Server; +use DBus::Reactor; + +my $server = DBus::Server->new(address => "unix:path=/tmp/dbus-perl-test"); + +$server->set_connection_callback(\&new_con); + +my $reactor = DBus::Reactor->new(); +$reactor->manage($server); + +$reactor->run(); + +$server->disconnect; + +exit 0; + +my %cons; + +sub new_con { + my $server = shift; + my $connection = shift; + + $cons{$connection} = $connection; + + $reactor->manage($connection); + + print "Got connection $connection\n"; +} + -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits
