#!/usr/bin/perl -w # Copyright (C) 2001 Michael Gage ############################################################################### # The initial code simply initializes variables, defines addresses # for directories, defines some simple subroutines responders used in debugging # and makes sure that the appropriate CPAN library modules # are available. The main code begins below that with the initialization # of the PGtranslator5 module. ############################################################################### use strict; use sigtrap; use Carp; #use lib '/u/gage/xmlrpc/daemon'; use lib '/Users/gage/webwork/xmlrpc/daemon'; use Webwork; use Frontier::Daemon_ww; ############################################################################### # This sections starts up the WeBWorK daemon at http://webwork-db.math.rochester.edu:8005/ ############################################################################### my $PORT = 8089; print "starting daemon on port $PORT\n"; new Frontier::Daemon_ww( LocalPort => $PORT, methods => { 'echo' => \&Webwork::echo, 'echo2' => \&Webwork::echo2, 'renderProblem' => \&Webwork::renderProblem, 'readFile' => \&Webwork::readFile, 'listLib' => \&Webwork::listLib, 'quit' => \&Webwork::xmlquit, 'hello' => \&Webwork::hello }); print "daemon stopped\n"; ############################################################################### # The WeBWorK daemon would exit through here (if I could figure out how to # shut it down remotely. :-) ) ###############################################################################