Re: [twsocket] Compiling latest ICS-beta
I also get the same parameter mismatch errors in BCB6 that Bjørnar mentioned in his mail. Any ideas? Bjørnar: are these errors gone in your set-up now? What did you do? I used the 20060309 beta and the forementioned constants are commented-out (I checked it). On 1/27/06, Bjørnar Nielsen [EMAIL PROTECTED] wrote: I downloaded and installed latest beta and I found these problems (using BCB6). The package compiled fine but I get errors when using ICS in a testproject in WSocket.hpp on these: IOCPARM_MASK IOC_VOID IOC_OUT IOC_IN IOC_INOUT They are defined in both Winsock.pas and WSoscket.pas. When I removed them from WSocket.pas the errors was gone. I also get error in HttpContCod.hpp on __property bool Active = {read=GetActive, nodefault}; (line 85) __property AnsiString Coding = {read=GetCoding}; (line 86) The error is parameter mismatch. Regards Bjørnar -- 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] THttpCli and redirected links bug - continued
I experienced the same RequestDone error and asked about it previously. I handled it by checking de StatusCode. On a RequestDone with StatusCode = 0, it's not the final one and more will follow. However, I seem to end up with clients that never generate a RequestDone anymore... That means clients that never finish, which stalls the complete download process. I hope we can start the discussion again. Thanks. --Merijn Btw, I use C++ builder 6 too... Is this a builder-specific bug? On 9/28/05, Bjørnar Nielsen [EMAIL PROTECTED] wrote: First, i have not read the messages you write this follow up to. This is a follow up. I wanted to report what appears to be a related issue to the bug in THttpCli when a link is redirected. It seems that the RequestDone is called twice. This has already been reported and I've implemented a work around in my program. If you get data together with the redirection, mabe it is not a bug that you get requestdone twice? I've discovered another issue in that it doesn't seem that the RcvdStream is being cleared. For example, when a link is requested using THttpCli and it is redirected, there can be garbage at the beginning of RcvdStream. RcvdStream should only contain the document obtained from the redirected link and nothing from the original link that caused the redirection. I am using the latest release version and C++Builder 6. I have reproduced this problem in my application using this link provided by a user: http://net1test.rhmware.com/marketingprimer I have worked around this issue by clearing RcvdStream when the LocationChange event is called using: if (HttpCli-RcvdStream) { HttpCli-RcvdStream-Seek(0,soFromBeginning); } If LocationChange is triggered before you have received all the data from first request, maybe you should clear the stream in requestdone instead,? By the way, I hope the above is sufficient to clear the stream but I'm not sure that it is. If it isn't can anyone state the correct way to clear/reset a steam? I can't find it in the documentation. This only sets the position in the stream, in this case to the start of the stream. Then when you receive data, the data is written from the start of the stream, overwriting previous data if there are any. If you use a TMemoryStream, you can use Clear or SetSize, this will also delete old data. You can also delete the stream and make a new stream. Regards Bjørnar -- 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] Installing ICS under windows 3.11
If you can compile C++, you could check if you can use something out of the ptypes library. Since you only need communication and not all the overhead... How about setting up the communication thru SOAP? There *should* be a DOS implementation of SOAP out there somewhere... (perl on DOS? perl can do it). This is actually a good question to ask on experts-exchange.com. --Merijn On 8/15/05, Carl Hendry [EMAIL PROTECTED] wrote: Please help: I need to establish a program to program connection between two computers; one running windows XP, the other running Windows 3.11. I have Delphi 7 on the XP and Delphi 1 on the 3.11. I was going to install the ICS suite on the 3.11, but ICS uses long filenames which are not legal in 3.11. Is this the easiest way to establish this comms or is there a better way? The purpose of the link is, the 3.11 machine will be connected to a flight simulator cockpit I am building as the hardware interface, the XP machine will host MS flightsim and send/receive data to/from the hardware via the 3.11 machine. I am an absolute newby with programming sockets and TCP/IP, but I am an experienced delphi apps programmer. Many thanks in advance... Regards: Scott Hendry #;#) -- 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 StatusCode = 0 causes problems
I'm trying to write a spider that collects web pages. In the LocationChange event, I check the properties of the new location. For instance: - Is the new location a URL that is present on a black-list of banned URL's or domains? - Is there a robots.txt file for the new location? - Other properties that would lead to an abort of the request. - Empty the received data buffer so that the buffer only contains the contents of the new location (I also use the OnDocData event to add received data to my buffer).. In the RequestDone event, I process the collected data. A flag is set for the client to be deleted when the clean up routine comes by. I use the RequestDone event because this way I'm sure now other events can be triggered and it is save to delete the client. Thanks, --Merijn P.S. Would it be more efficient to do things another way? On 27 Jul 2005 3:48:57 +0100, Maurizio Lotauro [EMAIL PROTECTED] wrote: On 26-Jul-05 09:31:34 Merijn Terheggen wrote: Yes, I'm using the original client. Also the latest version. Don't you get the same results when you add a LocationChange event handler and set breakpoints in both the LocationChange and the RequestDone event handlers? What are you doing in these events? Bye, Maurizio. -- 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 StatusCode = 0 causes problems
Yes, I'm using the original client. Also the latest version. Don't you get the same results when you add a LocationChange event handler and set breakpoints in both the LocationChange and the RequestDone event handlers? Thanks, --Merijn On 26 Jul 2005 1:44:16 +0100, Maurizio Lotauro [EMAIL PROTECTED] wrote: On 23-Jul-05 17:04:48 Merijn Terheggen wrote: I noticed some behavior of HttpCli that caused me a LOT of headaches before I discovered what was going on and made a work-around. [...] Are you using the original HttpCli or an inherited version made by you? Bye, Maurizio. -- 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 StatusCode = 0 causes problems
Here you go: 'http://help.lycos.com' redirects into 'http://help.lycos.com/network_1_help.asp'. 'http://help.lycos.com/network_1_help.asp' redirects into 'http://help.lycos.com/network_1_help.asp', which is into itself. After the 2 LocationChange events, there will be 2 RequestDone events. The first one with a StatusCode = 0 and the second one with a StatusCode = 200. --Merijn On 7/23/05, Francois PIETTE [EMAIL PROTECTED] wrote: Why is there a RequestDone event while the StatusCode is still zero anyway? I would be interested in finding a reproductible case where it occurs. -- [EMAIL PROTECTED] http://www.overbyte.be - Original Message - From: Merijn Terheggen [EMAIL PROTECTED] To: ICS support mailing twsocket@elists.org Sent: Saturday, July 23, 2005 6:04 PM Subject: [twsocket] HttpCli StatusCode = 0 causes problems I noticed some behavior of HttpCli that caused me a LOT of headaches before I discovered what was going on and made a work-around. This mail is to ask you: - If the behavior that I noticed indeed happens the way I describe - If the behavior is consiously designed this way or needs to be changed On the RequestDone event, the StatusCode can be 0. I only notice this happen rarely in certain cases of a redirect (FollowRelocation set to 'true'). If I've seen things correct, there can be ANOTHER RequestDone event following in this case. Why is this a problem? The RequestDone event is typically used to process the HttpCli data. After processing, the client potentially could get deleted since it has no function anymore (as happens in my code at least). However, another RequestDone event following the first one when the client has been deleted already causes access violations etc. The only way to be sure the RequestDone event is the 'final' event seems to be a check on the StatusCode. In case the StatusCode = 0, I let the event handler return because another RequestDone event will follow. Why is there a RequestDone event while the StatusCode is still zero anyway? Thanks, --Merijn -- 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