use IO::Socket::INET;
use IO::Socket::SSL; # qw(debug3);
use Sherlock::Object;
+use POSIX;
sub new($) {
my $user = $ENV{"USER"} or die "Environment variable USER not set\n";
my $root = $ENV{"MO_ROOT"} or die "Environment variable MO_ROOT not set\n";
my $self = {
"Contest" => "CPSPC 2007",
- "Server" => "localhost:8888",
- "Key" => "$mo/key.pem",
+ "Server" => "kamzice.ms.mff.cuni.cz:8888",
+ "Key" => "$mo/key.pem", # Keys and certificates
"Cert" => "$mo/cert.pem",
"CACert" => "$mo/ca-cert.pem",
"Trace" => defined $ENV{"MO_SUBMIT_TRACE"},
+ "Checks" => 1,
+# "History" => "$home/.history", # Keep submission history in this directory
+ "RefreshTimer" => 60000, # How often GUI sends STATUS commands [ms]
+ "root" => $root,
"user" => $user,
"sk" => undef,
"error" => undef,
return $self->reply;
}
+sub local_submit($$$$$) {
+ my ($self, $task, $part, $ext, $filename) = @_;
+ my $hist = $self->{"History"};
+ -d $hist or mkdir $hist or return "Unable to create $hist: $!";
+ ### FIXME: Unfinished
+}
+
1;