Ver Mensaje Individual
  #4  
Antiguo 31-10-2008
azulin azulin is offline
Miembro
 
Registrado: sep 2008
Posts: 13
Reputación: 0
azulin Va por buen camino
Hola de nuevo,

estoy usando el siguiente código que me sugirió Omega, pero hay algunas unidades que no las encuentra: IdThreadMgr, IdThreadMgrDefault

Estoy usando Turbo Delphi 2006 e Indy 10.

No se donde puede estar el problema...


Código:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, IdBaseComponent, IdComponent, IdTCPServer, IdHTTPServer,
  StdCtrls, StrUtils, IdThreadMgr, IdThreadMgrDefault;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure IdHTTPServer1CommandGet(AThread: TIdPeerThread; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
  private
    { Private declarations }
  public
    { Public declarations }
    IdHTTPServer1: TIdHTTPServer;
  end;
var
  Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
 IdHTTPServer1.Active := True;
end;
procedure TForm1.IdHTTPServer1CommandGet(AThread: TIdPeerThread;
  RequestInfo: TIdHTTPRequestInfo; ResponseInfo: TIdHTTPResponseInfo);
begin
 if ARequestInfo.Document = '/iniciar' then begin
 ShowMessage('Iniciar');
 end else begin
 ShowMessage('Finalizar');
 end;
 AResponseInfo.CloseConnection := True;
end;
end.
Muchas gracias!!


dasda
Responder Con Cita