From aa92df3c58daefb994da555fb45f2e3ee55f38d5 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 14 Nov 2001 16:59:02 +0000 Subject: Latest and various changes --- lib/HttpServ.cc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'lib/HttpServ.cc') diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc index 84078e0..3bec28f 100644 --- a/lib/HttpServ.cc +++ b/lib/HttpServ.cc @@ -7,9 +7,18 @@ String endhl = "\r\n", endnl = "\n"; -HttpServ::HttpServ(int port, const String & nname) : name(nname), localport(port) { - Listener.SetLocal("", port); - Listener.Listen(); +HttpServ::HttpServ(int port, const String & nname) throw (GeneralException) : name(nname), localport(port) { + bool r = true; + + r = Listener.SetLocal("", port); + if (r) { + r = Listener.Listen(); + } + + if (!r) { + throw GeneralException("Initialisation of the Mini HTTP-Server failed."); + } + cerr << "Mini HTTP-Server '" << name << "' ready and listening for port " << port << endl; } @@ -128,7 +137,7 @@ void HttpServ::ParseVars(Handle * s, int len) { s->read(&l, 1); t += l; } - cerr << "Post variables line: '" <> t; -- cgit v1.2.3