[system] / trunk / xmlrpc / RPC / RPC-XML-0.25 / lib / Apache / RPC / status.code Repository:
ViewVC logotype

View of /trunk/xmlrpc/RPC/RPC-XML-0.25/lib/Apache/RPC/status.code

Parent Directory Parent Directory | Revision Log Revision Log


Revision 279 - (download) (annotate)
Fri May 17 21:44:04 2002 UTC (17 years, 2 months ago) by gage
File size: 1419 byte(s)
Experimental xmlrpc WeBWorK webservices

    1 ###############################################################################
    2 #
    3 #   Sub Name:       status
    4 #
    5 #   Description:    Create a status-reporting struct and returns it.
    6 #
    7 #   Arguments:      NAME      IN/OUT  TYPE      DESCRIPTION
    8 #                   $srv      in      ref       Server object instance
    9 #
   10 #   Globals:        None.
   11 #
   12 #   Environment:    None.
   13 #
   14 #   Returns:        hashref
   15 #
   16 ###############################################################################
   17 sub status
   18 {
   19     use strict;
   20 
   21     my $srv = shift;
   22 
   23     my $status = {};
   24     my $time = time;
   25     my $URI;
   26 
   27     require URI;
   28 
   29     $status->{name} = ref($srv);
   30     $status->{version} = new RPC::XML::string $srv->version;
   31     $status->{host} = $srv->host || $srv->{host} || '';
   32     $status->{port} = $srv->port || $srv->{port} || '';
   33     $status->{path} = new RPC::XML::string $srv->path;
   34     $status->{child_pid} = $$;
   35     $status->{date} = RPC::XML::datetime_iso8601
   36         ->new(RPC::XML::time2iso8601($time));
   37     $status->{started} = RPC::XML::datetime_iso8601
   38         ->new(RPC::XML::time2iso8601($srv->started));
   39     $status->{child_started} = RPC::XML::datetime_iso8601
   40         ->new(RPC::XML::time2iso8601($srv->child_started));
   41     $status->{date_int} = $time;
   42     $status->{started_int} = $srv->started;
   43     $status->{child_started_int} = $srv->child_started;
   44     $status->{total_requests} = $srv->requests + 1;
   45 
   46     $status;
   47 }

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9