Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.324.591 Times

Net::Chat::Daemon 0.3

  Date Added: April 01, 2010  |  Visits: 759

Net::Chat::Daemon

Report Broken Link
Printer Friendly Version


Product Homepage
Download (94 downloads)



Net::Chat::Daemon is a Perl module to run a daemon that is controlled via instant messaging. ABSTRACT This package is intended to serve as a superclass for objects that want to communicate via IM messages within a distributed network of client nodes and a coordinator, without dealing with the complexities or implementation details of actually getting the messages from place to place. It pretends to be protocol-neutral, but for now and the conceivable future will only work with a Jabber transport. (It directly uses the message objects and things that Jabber returns.) Note that this package will NOT help you implement an instant messaging server. This package is for writing servers that communicate with other entities via instant messages -- servers written using this package are instant messaging *clients*. SYNOPSIS package My::Server; use base Net::Chat::Daemon; sub handleHello { return "hello to you too"; } sub handleSave { my ($filename, $file) = @_; return "denied" unless $filename =~ /^[.w]+$/; open(my $fh, ">/var/repository/$filename") or return "failed: $!"; print $fh $file; close $fh or return "failed: $!"; return "ok"; } sub someMethod { my ($self, @args) = @_; . . . } sub new { my ($class, $user, %options) = @_; return $class->SUPER::new(%options, commands => { callMethod => someMethod, save => &handleSave }); } package main; my $server = My::Server->new(myuserid@jabber.org); $server->process(); # or to do it all in one step, and retry connections for 5 minutes # (300 seconds) before failing due to problems reaching the server: My::Server->run(myuserid@jabber.org, retry => 300); When you run this, you should be able to send a message to userid@jabber.org saying "hello" and get a response back, or "callMethod a b c" to call the method with the given arguments. To use the "save" command, youll need to use a command-line client capable of sending attachments in the format expected by this server (it currently does not use any standard file-sending formats). The jabber command packaged with this module can do this via the -a command-line option. A note on the implementation: when I first wrote this, it was really only intended to be used with Jabber. The code hasnt been fully restructured to remove this assumption..

Requirements: No special requirements
Platforms: Linux
Keyword: Instant Libraries Module Netchatdaemon Package Perl Module Programming Return Sub To Run Via
Users rating: 0/10

License: Freeware Size: 13.31 KB
USER REVIEWS
More Reviews or Write Review


NET::CHAT::DAEMON RELATED
Libraries  -  Apache::TestRun 1.28
Apache::TestRun is a Perl module to run the test suite. SYNOPSIS The Apache::TestRun package controls the configuration and running of the test suite. METHODS Several methods are sub-classable, if the default behavior should be changed....
143.36 KB  
Libraries  -  Benchmark::Forking 0.99
Benchmark::Forking is a Perl module to run benchmarks in separate processes. SYNOPSIS use Benchmark::Forking qw( timethis timethese cmpthese ); timethis ($count, "code"); timethese($count, { Name1 => sub { ...code1... }, Name2 => sub {...
6.14 KB  
Libraries  -  Libgmonodp 0.3.0
Libgmonodp enables monopd-compatible boardgame clients (such as gtkmonop) to run their own servers internally. Installation: The simplest way to compile this package is: 1. `cd to the directory containing the packages source code and type...
44.03 KB  
Libraries  -  AutoSplit 5.8.8
AutoSplit is a Perl module that can split a package for autoloading. SYNOPSIS autosplit($file, $dir, $keep, $check, $modtime); autosplit_lib_modules(@modules); This function will split up your program into files that the AutoLoader module...
12.2 MB  
Programming  -  Perl Module Manager 1.2.0.18
Perl Module Manager helps you to install, un-install and manage Perl modules from a CPAN site and other sources in an easy and intuitive way. Allows you to search through thousands of useful modules and libraries on a CPAN site and its mirrors....
1.44 MB  
Libraries  -  Class::Agreement 0.02
Class::Agreement is a Perl module that add contracts to your Perl classes easily. SYNOPSIS package SomeClass; use Class::Agreement; # use base Class::Accessor or Class::MethodMaker, # or roll your own: sub new { ... } invariant { my...
27.65 KB  
Libraries  -  Language::XSB 0.14
Language::XSB is a Perl module that allows you to use XSB from Perl. SYNOPSIS use Language::XSB :query; use Language::Prolog::Types::overload; use Language::Prolog::Sugar vars=>[qw(X Y Z)], functors=>{equal => =}, functors=>[qw(is)],...
14.34 KB  
Libraries  -  PDL::Graphics::LUT 2.3.2
PDL::Graphics::LUT is a Perl module that provides access to a number of look-up tables. SYNOPSIS use PDL::Graphics::PGPLOT; use PDL::Graphics::LUT; # what tables are available my @tables = lut_names(); # get the reversed colour table...
1.1 MB  
Libraries  -  Include 1.02a
Include is a Perl module that allow you to use #defines from C header files. SYNOPSIS use Include qw(-I /some/path/of/mine); use Include q ; use Include q "/[A-Z]/"; The Include module implements a method of...
6.14 KB  
Libraries  -  Tie::DB_Lock 0.07
Tie::DB_Lock Perl module can tie hashes to databases using shared and exclusive locks. SYNOPSIS use Tie::DB_Lock; use DB_File; tie(%hash, Tie::DB_Lock, $filename, rw); # Open for writing $hash{key} = value; untie %hash; tie(%hash2,...
7.17 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB