#! /usr/bin/perl

############################################################
#
# This code is dual licensed.
#
# See either Artistic.html or COPYING.lib for the exact conditions.
# Choose among Artistic.html and COPYING.lib the license you prefer.
#
# THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# (C) 2001 Centre Universitaire d'Informatique, University of Geneva
#
# Author: Wolfgang M&uuml;ller  <Wolfgang.MUELLER@cui.unige.ch>


require Exporter;
# use lib ".";

use MRML::Server::Base;

package main;

my $VERSION="0.03";

my $lDefaultPort=12789;

# the MRML server will listen on port 10101 unless
# another value was given on the command line
my $lAddress= shift || "$ENV{HOST}" || "localhost";
my $lPort= shift || $lDefaultPort;

print STDERR "$0 [adress] [port]
Default for adress is: $ENV{HOST} or 'localhost' if \$HOST is not set
Default for port is:          $lDefaultPort

WARNING: with the current parameters,
will accept connections *to* your $lAddress In case of problems, use 
your *full host name* (e.g. viper.unige.ch) to allow people to connect 
from the outside! 

In case of problems, mailto:wolfgang.mueller\@cui.unige.ch
";

#constructing the server
my $lServer;

$lServer=new MRML::ExampleServer(address => $lAddress,
				 port    => $lPort);

#starting the server
$lServer->serve();


















