summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2007-12-23 08:08:30 +0000
committerAndrew Gaffney <agaffney@gentoo.org>2007-12-23 08:08:30 +0000
commit6c82a76b912c7a15ab58b339e7dfb511687846fa (patch)
tree769e2b609713328f0f96a85b7b363ade7cd8f126 /server
downloadscire-6c82a76b912c7a15ab58b339e7dfb511687846fa.tar.gz
scire-6c82a76b912c7a15ab58b339e7dfb511687846fa.tar.bz2
scire-6c82a76b912c7a15ab58b339e7dfb511687846fa.zip
initial perl-based client and server with shiny IPC
svn path=/branches/new-fu/; revision=252
Diffstat (limited to 'server')
-rwxr-xr-xserver/scireserver.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/scireserver.pl b/server/scireserver.pl
new file mode 100755
index 0000000..e328118
--- /dev/null
+++ b/server/scireserver.pl
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+$| = 1;
+my $jobdir = "/tmp/scirejobs";
+
+while(<>) {
+ my $line = $_;
+ chomp $line;
+ if($line =~ /^PING$/) {
+ print "PONG\n";
+ } elsif($line =~ /^QUIT$/) {
+ print "Exiting!\n";
+ exit;
+ } else {
+ print "Unknown command\n";
+ }
+}