Thread View: borland.public.cppbuilder.internet.web
3 messages
3 total messages
Started by SD
Mon, 06 Jun 2005 15:01
Keep-Alive, Connection and ProxyConnection...
Author: SD
Date: Mon, 06 Jun 2005 15:01
Date: Mon, 06 Jun 2005 15:01
70 lines
3032 bytes
3032 bytes
Hi to all,
I've a serious problem with Indy (9.0.18) and following system:
Computer A (CA):
- Indy HTTP Client
- Proxy enabled
Computer B (CB):
- Indy HTTP Server
- Direct connection to a dial-up ISP (56K)
The (CA) send a lot of very short requests to (CB)
between Indy HTTP Client, enabled to work with a
proxy which don't require any password and username.
The only HTTP command used is GET and the request is
very simple:
- FHTTP.Get('/?method=GetTime);
The (CB), in the HTTPServer OnCommandGet, parse the request
object and fill the response with:
- AResponseInfo.ResponseNo := 200;
- AResponseInfo.ContentText := IntToStr(timeGetTime);
- AResponseInfo.ContentType := 'text/html';
- AResponseInfo.ContentLength := Length(AResponseInfo.ContentText);
All seem work fine, but at very very low speed, about 300-500ms for
a single GET request.
I've tried to overload the Server work in (CB) with a simultaneous call
of many CA instances (32) and I can see the MODEM data flow increase
but the response timing is always the same (this is been useful
to undestand that mine isn't a problem of low modem throughput
but only an effect of continuos: connect to server, disconnect from server.
At this point I've inserted in my client in (CA) the following lines:
- FHTTP.Request.Connection := 'keep-alive';
- FHTTP.Request.ProxyConnection := 'keep-alive';
to enable the keep-alive mode in client side.
The speed results aren't unfortunately changed again, so
I've tried to set the KeepAlive property of Server in (CB) with
FHTTPServer.KeepAlive := True;
but results are the same.
I've tried again to insert in HTTPServer OnCommandGet the
following lines:
- AResponseInfo.Response.Connection := 'keep-alive';
- AResponseInfo.Response.ProxyConnection := 'keep-alive';
but results are same again.
I've tried to debug INDY source step-by-step and I've
saw that in my:
FHTTP.Response.Connection I've found a '' (empty string);
FHTTP.Response.ProxyConnection I've found a 'close';
What I've to do to obtain a persistent connection by my
HTTP Client in (CA) and HTTP Server in (CB) ?
Thank you very much....
Silverio Diquigiovanni
Re: Keep-Alive, Connection and ProxyConnection...
Author: Remy Lebeau (TeamB)
Date: Mon, 06 Jun 2005 17:07
Date: Mon, 06 Jun 2005 17:07
12 lines
1149 bytes
1149 bytes
"SD" <nospawm@please.it> wrote in message
news:42a46567@newsgroups.borland.com...
> - FHTTP.Get('/?method=GetTime);
That is not valid. You must always specify the complete URL:
FHTTP.Get('http://www.site.com/?method=GetTime);
Gambit
Re: Keep-Alive, Connection and ProxyConnection...
Author: Remy Lebeau (TeamB)
Date: Mon, 06 Jun 2005 17:55
Date: Mon, 06 Jun 2005 17:55
12 lines
1192 bytes
1192 bytes
"SD" <nospawm@please.it> wrote in message news:42a46567@newsgroups.borland.com... > I've a serious problem with Indy (9.0.18) and following system: P.S. please do not cross-post. It is against Borland's newsgroup guidelines (http://info.borland.com/newsgroups). Only post to the single most appropriate group. 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