[twsocket] HTTPCLI Close
Hi What happens when THTTPCLI.close procedure is called? Does it always call OnRequestDone event? Ann -- 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
Re: [twsocket] HTTPCLI Close
In your code? So do I have to implement something so it would be true? Wiadomość Oryginalna Od: Fastream Technologies [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 14:21:04 +0200 Temat: Re: [twsocket] HTTPCLI Close In my code, yes it does. Regards, SZ - Original Message - From: Me [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Saturday, December 17, 2005 2:17 PM Subject: [twsocket] HTTPCLI Close Hi What happens when THTTPCLI.close procedure is called? Does it always call OnRequestDone event? Ann -- 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 -- 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
[twsocket] HTTPCLI TimeOut implementation help : -(
Hi Im trying to make basic proxy checker based on THTTPCli component, but have problem with timeout. Would like to have 2 timeouts - connection timeout and verification timeout. So i made something like this... Made one timer that is being run before .GetAsync (connection timeout) and one in OnSessionConnect event (verification timeout). And what should i do in OnTimer event? HTTPCli.CloseAsync / Close doesnt seems to call OnRequestDone... any idea? -- 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
[twsocket] HTTPCLI GETASYNC and SLEEP?
HI Thanks everybody for help with previous problems, but now i got another :-) I hope it will be the last one. The problem is that i wouldlike to implement retries on HTTPCLI but so it would wait some time before retrying... Sleep doesnt seems to be the right choice because it ruins GetAsync... Any way to make a async sleep for getasync? Ann -- 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
Re: [twsocket] HTTPCLI GETASYNC and SLEEP?
Because its semi-multithreaded application. I got 20 HTTPClient components. Wiadomość Oryginalna Od: Fastream Technologies [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 17:26:49 +0200 Temat: Re: [twsocket] HTTPCLI GETASYNC and SLEEP? Why not use a timer and launch the second request on OnTimer? You would need to start the time (Enabled := true;) in OnSessionClosed. Regards, SZ - Original Message - From: Me [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Saturday, December 17, 2005 5:00 PM Subject: [twsocket] HTTPCLI GETASYNC and SLEEP? HI Thanks everybody for help with previous problems, but now i got another :-) I hope it will be the last one. The problem is that i wouldlike to implement retries on HTTPCLI but so it would wait some time before retrying... Sleep doesnt seems to be the right choice because it ruins GetAsync... Any way to make a async sleep for getasync? Ann -- 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 -- 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
Re: [twsocket] HTTPCLI GETASYNC and SLEEP?
Wiadomość Oryginalna Od: Francois PIETTE [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 16:25:56 +0100 Temat: Re: [twsocket] HTTPCLI GETASYNC and SLEEP? I wouldlike to implement retries on HTTPCLI but so it would wait some time before retrying... Sleep doesnt seems to be the right choice because it ruins GetAsync... Any way to make a async sleep for getasync? You never wait with ICS since it is asynchronous. You can implement retries using a timer. When you start your request (for example your GetAsync), you start a timer. When the request is done (OnRequestDone), you clear the timer. If your timer event triggers, then you have a timeout and need to retry. You then call Abort to stop the current request and then restart the whole thing. Don't forget to count the number of retries to avoid infinite retrying... Ok but... i got 20 HTTPCli components working as multithreading... -- 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
Re: [twsocket] HTTPCLI GETASYNC and SLEEP?
Wiadomość Oryginalna Od: Francois PIETTE [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 17:07:26 +0100 Temat: Re: [twsocket] HTTPCLI GETASYNC and SLEEP? Ok but... i got 20 HTTPCli components working as multithreading. .. With ICS, you don't need to use multithreading to have 20 HTTP components running in parrallel doing different things ! Use multithreading for your blocking processing, if any. It will be much easier to develop and debug. If you think you need multithreading, please explain your reasons and I'll tell you if you are right or not. Its a proxy checker... it has to have some threds (few async components) so i wouldnt check whole day :] -- 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
[twsocket] HttpCli and Socket operation on non- socket
Ok. I made basic proxy checker... 5xHTTPCli that tries to connect through one of the proxies (with GetAsync method) from list and analizes if result is ok. But... I noticed that the more HTTPCli i use the more frequent Socket operation on non-socket error occures. Why is that? What is this error? And sometimes getting Connection refused error but it seems to be ok... but how do i trun off error notify? Ann -- 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
Re: [twsocket] HttpCli and quot;Socket operation on non-socketquot;
Wiadomość Oryginalna Od: Francois PIETTE [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 18:26:32 +0100 Temat: Re: [twsocket] HttpCli and Socket operation on non-socket Ok. I made basic proxy checker... 5xHTTPCli that tries to connect through one of the proxies (with GetAsync method) from list and analizes if result is ok. But... I noticed that the more HTTPCli i use the more frequent Socket operation on non-socket error occures. Why is that? What is this error? This error is when you pass a handle to a winsock function, but the handle is not one opened with winsock. This should _never_ occur with ICS. It may happend when you have corruption somewhere in you data or code and close handles which are socket handles, then they became invalid and then you get the error. I dont do anything except using ICS HTTPCLI :-) So even if this should _never_ occur, it DOES :-) -- 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
[twsocket] HttpCli Close or CloseAsync?
Whats the difference between Close and CloseAsync? If i am using GetAsync shouldnt i use CloseAsync instead of Close? Maybe thats why im getting socket errors? Ann -- 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
[twsocket] HttpCli.RcvStream - how to clear?
Hi I noticed that if I'm not doing anything with RCVStream of HTTPCli in requests im getting Stream with data from previous requests that were made on the component. How do i avoid it? How to cleanup rcvStream? Setting it to nil after RequestDone causes Access Violation. Ann -- 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
Re: [twsocket] HttpCli.RcvStream - how to clear?
Would be great but sometimes im not reciving any data so the old one wont be overwritten ;-( Wiadomość Oryginalna Od: Ionut Muntean [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Sat, 17 Dec 2005 22:50:36 +0200 Temat: Re: [twsocket] HttpCli.RcvStream - how to clear? Try RcvStream.Position := 0; when resetting ... If you set it to nil, it is obvious you'll get Access Violations. / IM Me wrote: Hi I noticed that if I'm not doing anything with RCVStream of HTTPCli in requests im getting Stream with data from previous requests that were made on the component. How do i avoid it? How to cleanup rcvStream? Setting it to nil after RequestDone causes Access Violation. Ann -- 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
Re: [twsocket] File download
I dont really know C++ (programming in Delphi) but thanx for your help Fastream Technologies! Managed to make it work in delphi based on your code. Thanks to your help, I discovered something interesting, and if anyone would have similar problem (with downloading files from forums keeping the orginal name of file), look at this: When im trying to download a file from forum (entering http://... download.php?id=) im getting the following headers: GET /testforum/download.php? id=1001sid=6c64e0d2e4ab62240ac9f4410587a166 HTTP/1.0 Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 Referer: http://www.testsite.com/testforum Connection: Keep-Alive User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [pl] Host: www.testsite.com Cookie: censored GET /testforum/forumfiles/testfile.txt HTTP/1.0 Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 Referer: http://www.testsite.com/testforum Connection: Keep-Alive User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [pl] Host: www.testsite.com Cookie: censored As you can see there is redirection (its kinda obvious). So the easiest way to recive testfile.txt name is just getting HTTPCLI. DocName value OnRequestDone ;-) Thanks again!!! Ann -- 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
Re: [twsocket] File download
Yes i know... but how do i get that header with HTTPCli ? I used a sniffer and it is sent in server response header: Content-Type: application/octetstream; name=testfile.zip But how do i get it in HTTPCli? Thanx for your patience! Ann Wiadomość Oryginalna Od: Francois Piette [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Fri, 9 Dec 2005 11:39:25 +0100 Temat: Re: [twsocket] File download Damn... its not working with .zip files... those are Headers sent by me, and i need headers recived in response :/ I know i wrote it worked before but it wasnt... it only worked with .txt or .html file... any further help? You should look at the header line is sent by the server in response of your zip file to search where you can get the information. I suspect you have content-type set to application/zip or similar. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) 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 -- 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
[twsocket] (beer) and cookies for all !!!
Please somebody help me or ill go crazy... :/ I've tried everything, looked everywhere... and nothing!! How do i get recieved headers with HTTPCli ?? I need Content-Type... PLEASE!!! Desperated and on the border of madness, Ann -- 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
Re: [twsocket] (beer) and cookies for all !!!
Thank you for friendly advice. Ann Wiadomość Oryginalna Od: Wilfried Mestdagh [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Fri, 9 Dec 2005 19:39:43 +0100 Temat: Re: [twsocket] (beer) and cookies for all !!! Hello Ann, Very often you start a new thead just by replying on an existing and change the subject. Remember that modern email readers can sort on reference rather than subject. So doing so your message will not be seen by people who sort like this. So please create a new message for a new thead instead of reply :) --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- 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
Re: [twsocket] File download
This one is always empty :( Wiadomość Oryginalna Od: Fastream Technologies [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Fri, 9 Dec 2005 09:25:18 +0200 Temat: Re: [twsocket] File download Use Client-LastResponse. Regards, SZ - Original Message - From: Me [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Friday, December 09, 2005 8:37 AM Subject: Re: [twsocket] File download Ok. But... i really have no idea how do i get a header... in OnHeader events there is no such a variable as Data or Buffer or any... Searched the google but found nothing... how do i get header data into stream/string so i could parse it? Wiadomość Oryginalna Od: Fastream Technologies [EMAIL PROTECTED] Do: ICS support mailing twsocket@elists.org Data: Thu, 8 Dec 2005 22:07:15 +0200 Temat: Re: [twsocket] File download You need to parse the header on OnHeaderEnd. First store it in a class variable in OnHeaderData. Notice that this event is called each time a header line comes. Sounds cool but... if the file is being downloaded from forum.. . i wouldlike to recive its name and save under the name given by server... any idea how? -- 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 -- 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
[twsocket] File download
Hmm... How do i download a file and save it on disk? Got the RcvdStream and... what? How do i save it to file? I thought that stream.savetofile would work but there is no such a thing... Ann -- 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
[twsocket] HTTPCli cookies support
Hi Whats the easiest/fastest way to implement automatic cookies support to HTTPCli? I mean automaticly use cookies sent by server (replace existing cookies if they are available already). I know that i should just write a code to OnCookie event, but how should it look like so it would work the best? Thank you for help! Ann -- 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
[twsocket] HTTPCli And PHPBB Forums...
Hi. How do i handle phpbb forums with httpcli? I tryied to login from other browser and then to set the cookie as it is in the browser, but it doesnt work... could anybody help me? I wouldlike to login to the forum and be able to stay logged in so i could search the forums etc. Thank you! Ann -- 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