Hello,
Please find my code at http://www.fastream.com/ics/WebStressTesterSRC.zip .
Basically it is like this:
void __fastcall TesterThread::startClients(void)
{
clientList = new TList();
TSslHttpCli *bufferClient;
for(int i = 0; i < clientsPerThread; ++i)
{
bufferClient = new TSslHttpCli(NULL);
bufferClient->FollowRelocation = false;
bufferClient->OnHeaderData = HTTPClientHeaderData;
bufferClient->OnDocData = HTTPClientDocData;
bufferClient->OnRequestDone = HTTPClientRequestDone;
bufferClient->URL = URL;
bufferClient->Connection = (keepAlive ? "keep-alive" : "close");
bufferClient->SslContext = SslContext;
clientList->Add(bufferClient);
if(method == "GET")
bufferClient->GetASync();
else if(method == "HEAD")
bufferClient->HeadASync();
}
}
//---------------------------------------------------------------------------
...
void __fastcall TesterThread::HTTPClientRequestDone(TObject *Sender,
THttpRequest RqType, WORD ErrCode)
{
TSslHttpCli *bufferClient = (TSslHttpCli*)Sender;
if(method == "GET")
bufferClient->GetASync(); // here gives "Busy" error, WHY? ISN'T THIS THE
PROPER WAY TO USE THE COMPONENT??
else if(method == "HEAD")
bufferClient->HeadASync();
}
//---------------------------------------------------------------------------
Best Regards,
SZ
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be