about server push in indy9

Giganews Newsgroups
Subject: about server push in indy9
Posted by:  pengpzy (pe…@qcet.cn)
Date: Mon, 17 Oct 2005

Hello:
    I try to do a server push with indy 9 client.
the web server is tomcat5,and I have test it with a java client,now I want to do this in bcb6 with indy9;
but after I post to the server,I can not get any answer when the TidHTTP is connected,
and when the server close the connect,I get the answer.
why?

my code like this:
.....
IdHTTP2->Request->CustomHeaders->AddStdValues(TempList1);
if(!IdHTTP2->Connected()) IdHTTP2->Connect(20);

IdHTTP2->Post("/xmlBlaster/AppletServlet",TempList2) ; //it seems the IdHTTP wait at here
delete TempList1;delete TempList2;TempList1=NULL; TempList2=NULL;

Memo1->Lines->Add(IdHTTP2->Response->RawHeaders->Text);
char buff[65536];
IdHTTP2->IOHandler->Recv(buff,100);//
AnsiString tmpline=AnsiString(buff);  Memo1->Lines->Add(tmpline);

while(IdHTTP2->Connected())
{tmpline=( IdHTTP2->ReadLnWait(200) );Memo1->Lines->Add(tmpline);}

.....

I have try several read methods,but can not read any thing before it is connected.

if the code has some thing wrong?

thanks!

peng

Replies