Dear

is anybody there use visualserver from VisualSynapse (http://visualsynapse.sourceforge.net/?id=8) and impleted it on Linux has a console mode...??
Examples given is only on application interface ...

Problems:

1) When the application start, no web page are generated...
2) i would like to develop a variant of this web server. In this case, i need to trap the requests received by the process.

Here it is a sample that didn't working

//*************************************************************************************************
program shttpserver;

{$mode objfpc}{$H+}

uses
//ArticaAgent
 cthreads,custapp, Classes, SysUtils, fpcunit,httpserver ;

const
 Version = 'Version 0.1';

type
 TTestRunner = class(TCustomApplication)
 private


 protected
   procedure DoRun; override;
 public
 procedure Listen(receive:string);
 end;

procedure TTestRunner.DoRun;
 var
   I: integer;
   S: string;
 begin
  //  writeln('create...');
  end;
procedure TTestRunner.Listen(receive:string);
 begin
  //  writeln('string received: ' + receive);
  end;

var
 App: TTestRunner;
 eHTTP : TvsHTTPServer;
begin
 App := TTestRunner.Create(nil);
 eHTTP := TvsHTTPServer.Create(nil);
 eHTTP.LogFile := 'httplog.log';
 eHTTP.ServerName := 'Visual Synapse Demo HTTP Server';
 eHTTP.ListenPort := '8000';
 eHTTP.SSL := False;
 eHTTP.ListenIP := '0.0.0.0'; //any
 eHTTP.RegisterDir ('/home/touzeau/Desktop/visualserverdemo/web', '/');
 eHTTP.RegisterDefaultDoc('index.htm');
 eHTTP.Active := True;
// eHTTP.OnGet := @App.Listen; //not working it seems that here i can receive requests from clients.

 App.Initialize;
 App.Title := 'Console  www.';
 App.Run;
 App.Free;
end.

//*************************************************************************************************

--

David Touzeau -------------------------- Linux Ubuntu Dapper 6.0.6 FreePascal-Lazarus,perl,delphi,php icq:160018849
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to