> So I guess the correct place to immediately start another > download is StateChange event.
No, the correct place is from the OnRequestDone event and only that event. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be ----- Original Message ----- From: "Marcello Vezzelli" <[EMAIL PROTECTED]> To: "ICS support mailing" <[email protected]> Sent: Tuesday, January 03, 2006 5:41 PM Subject: [twsocket] HttpCli multiple download >> AL> Does anyone have an example of mulitple file upload using HTTP. I've >> AL> downloaded httpcliexample.zip and can upload single files, however >> when > > I'm working on a project which involves a sequence of file downloads via > http GET. > I noticed that a message posted with PostMessage in OnDocEnd event will > always precede the message WM_HTTP_SET_READY. > > procedure THttpCli.GetBodyLineNext; > [..] > TriggerDocEnd; <-- in OnDocEnd event I post the message > if {(FResponseVer = '1.0') or (FRequestVer = '1.0') or } > { see above } > { [rawbite 31.08.2004 Connection controll] } > (FCloseReq) then { SAE 01/06/04 } > FCtrlSocket.CloseDelayed > else > SetReady; <-- here WM_HTTP_SET_READY message is posted > > If the message code tries another download, the component gives an > exception > Http component busy, because SetReady sends a message too. > > So I guess the correct place to immediately start another download is > StateChange event. > > My question: is the message WM_HTTP_SET_READY required? > > What happens if I change the code this way? > > procedure THttpCli.SetReady; > begin > StateChange(httpReady); > //PostMessage(Handle, WM_HTTP_SET_READY, 0, 0); > end; > > StateChange is called from an event handler... so an event is executed > inside another event handler... bad design I think. But it works ;) > > Greetings > -- > Marcello Vezzelli > CTO > Software Development Department > E-Works s.r.l. > tel. +39 059 2929081 > fax +39 059 2925035 > Direzionale 70 - Via Giardini 456/c > 41100 Modena - Italy > > --------------------------------------------------------------------- > La presente comunicazione, che potrebbe contenere informazioni riservate > e/o > protette da segreto professionale, è indirizzata esclusivamente ai > destinatari della medesima qui indicati. Le opinioni, le conclusioni e le > altre informazioni qui contenute, che non siano relative alla nostra > attività caratteristica, devono essere considerate come non inviate né > avvalorate da noi. Tutti i pareri e le informazioni qui contenuti sono > soggetti ai termini ed alle condizioni previsti dagli accordi che regolano > il nostro rapporto con il cliente. Nel caso in cui abbiate ricevuto per > errore la presente comunicazione, vogliate cortesemente darcene immediata > notizia, rispondendo a questo stesso indirizzo di e-mail, e poi procedere > alla cancellazione di questo messaggio dal Vostro sistema. E' strettamente > proibito e potrebbe essere fonte di violazione di legge qualsiasi uso, > comunicazione, copia o diffusione dei contenuti di questa comunicazione da > parte di chi la abbia ricevuta per errore o in violazione degli scopi > della > presente. > --------------------------------------------------------------------- > This communication, that may contain confidential and/or legally > privileged > information, is intended solely for the use of the intended addressees. > Opinions, conclusions and other information contained in this message, > that > do not relate to the official business of this firm, shall be considered > as > not given or endorsed by it. Every opinion or advice contained in this > communication is subject to the terms and conditions provided by the > agreement governing the engagement with such a client. If you have > received > this communication in error, please notify us immediately by responding to > this email and then delete it from your system. Any use, disclosure, > copying > or distribution of the contents of this communication by a not-intended > recipient or in violation of the purposes of this communication is > strictly > prohibited and may be unlawful. > -- > 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 -- 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
