Dear
I'm using freepascal on Linux system.
I would like to use httpserver.
When i run my program :
The port is open but the index.htm is not generated.
I would like to trap all the clients requests but i don't know how ?
All examples i seen is GTK Interface and i would like ti use it as a
console mode daemon.
best regards.
Here it is my freepascal code :
###############################################
program sendstatus;
{$mode objfpc}{$H+}
uses
cthreads,custapp, Classes, SysUtils, fpcunit,httpserver;
type
FSendStatus = class(TCustomApplication)
private
protected
procedure DoRun; override;
procedure WebServerStart;
public
HTTP : TvsHTTPServer;
end;
procedure FSendStatus.WebServerStart;
begin
HTTP := TvsHTTPServer.Create (Self);
HTTP.LogFile := 'httplog.log';
HTTP.ServerName := 'Visual Synapse Demo HTTP Server';
HTTP.ListenPort := '10200';
HTTP.RegisterDir ('/home/touzeau/Desktop/synapse.zip_FILES/html', '/');
HTTP.SSL := False;
HTTP.ListenIP := '0.0.0.0'; //any
HTTP.Active := True;
end;
procedure FSendStatus.DoRun;
var
I: integer;
S: string;
// SETT:KLNetSettings;
begin
// SETT:=KLNetSettings.Create;
// Terminate;
end;
var
App: FSendStatus;
begin
App := FSendStatus.Create(nil);
App.Initialize;
App.Title := 'FPCUnit Console Test Case runner.';
App.WebServerStart;
App.Run;
App.Free;
end.
###############################################
--
David Touzeau -------------------------- Linux Ubuntu Dapper 6.0.6
FreePascal-Lazarus,perl,delphi,php icq:160018849
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public