🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
2 messages
2 total messages Started by Ulli Tue, 12 Apr 2005 09:31
IdHTTPServer Response timeing
#1273
Author: Ulli
Date: Tue, 12 Apr 2005 09:31
22 lines
1459 bytes
Hi,

with my WebServer I want to give the response page to a browser after I 
got some info of an other program. Means I don't want to give response 
directly in the  IdHTTPServer1CommandGet function but for the 
ServeFile(AThread, AResponseInfo,  as_RespFile) I need the AThread and 
AResponseInfo (obviously) that I get in the IdHTTPServer1CommandGet 
function. (Hopefully this is understandable)
What I wanted to know is, do I have to store the AThread and AResponseInfo 
myself in a list to give the response when I get the trigger from the 
other program or is there an other way to give response not directly.

Thanks
Ulli
Re: IdHTTPServer Response timeing
#1274
Author: Remy Lebeau (TeamB)
Date: Tue, 12 Apr 2005 17:12
28 lines
1960 bytes
<Ulli> wrote in message news:opso34q7nzgmwg2m@localhost...

> Means I don't want to give response directly in the
> IdHTTPServer1CommandGet function

You have to.  That is the only place where you can send a reply from.

> but for the ServeFile(AThread, AResponseInfo,  as_RespFile) I need
> the AThread and AResponseInfo (obviously) that I get in the
> IdHTTPServer1CommandGet function.

Yes.  Which is why you must send the reply from within
IdHTTPServer1CommandGet() only.  Also because the ARequestInfo and
AResponseInfo parameters are no longer valid objects as soon as
IdHTTPServer1CommandGet() exits, which is another reason why you cannot send
the reply after IdHTTPServer1CommandGet() exits.

> What I wanted to know is, do I have to store the AThread and
> AResponseInfo myself in a list to give the response when I get the
> trigger from the other program or is there an other way to give
> response not directly.

Why can't you make IdHTTPServer1CommandGet() simply wait for the page to be
made available before then sending it?


Gambit
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads