Re: [twsocket] Socket not sending SYN ACK - Help?
Thanks for your replies: 1) Yeah I know the SYN SYN ACK ACK should establish the connection and agree the SYN SYN ACK RST ACK looks like a client problem but the same client works to another machine. I'll try intercepting the packets too and see if that reveals anything. I'm inclined to think it's not a firewall issue as such, but I do think NAT may be having a part to play somewhere along the line. If I fire a test client at it I can't make it fail. It's sending the actual packet captured from a real client while failed so it's nothing to do with the data, but I can't get it to fail even when test client is run remotely using (via NAT). On 09/11/06, Fastream Technologies [EMAIL PROTECTED] wrote: Seems like a firewall problem to me. On 11/9/06, Arno Garrels [EMAIL PROTECTED] wrote: Dave R wrote: Time Remote Port Local Port Flags Notes --- 24997 - 80 [SYN] Seq=0 Len=0 MSS=1460 0.0 24997 - 80 [SYN ACK] Seq=0 Ack=1 Len=0 MSS=1460 Win=65535 So far so good. 0.2 24997 - 80 [RST ACK] Seq=1 Ack=1 Win=0 Len=0 Here the client should not send RST ACK, but ACK. Here my application has seen a client connection and disconnection. Sounds reasonable, I guess that the problem is on the client side. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- 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 -- Fastream Technologies Software IQ: Innovation Quality www.fastream.com | Email: [EMAIL PROTECTED] | Tel: +90-312-223-2830 -- 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] Help on ICS's HTTP client component
Hello everyone. Note: This is a re-post of a message sent to the Talk list, with more detail on the problem. This message gets sent the second time to this list too. I sent the first one before receiving elist's subscription confirmation so I don't think it went through. I'm having some trouble using the THttpCli component from the ICS suite. I'm using this component to simply download a document off a web site (the document might be a configuration file or a compressed DLL file or whatever). It mostly works but some times it just stops (gets stuck in a state - the last OnChangeState message I'm getting is httpDnsLookupDone) and then nothing happens. My application's GUI doesn't get stuck because Application's message pump is working, but the download doesn't finish ether. Or, if something does happen, I know nothing about it... Please note I'm using GetAsync to get my document. Extra information: I'm using the version of ICS marked [ Download the latest ICS-V5 Distribution ] on http://www.overbyte.be/frame_index.html. Is V6 for general consumption? Should I try that? The web server I'm accessing is likely not the cause for this problem as the server is an Apache server running on a Windows machine on my LAN. I did implement a kind of time-out mechanism into my download thing: if no event is triggered for a given amount (no state change, no data received, no error) I consider the connection to be timed out. This gets my application back on the track working properly but this feels like a hack, it doesn't seem to be the right thing to do. Please correct me if I'm wrong! Thanks, Cosmin Prund -- 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] Help on ICS's HTTP client component
I did implement a kind of time-out mechanism into my download thing: if no event is triggered for a given amount (no state change, no data received, no error) I consider the connection to be timed out. This gets my application back on the track working properly but this feels like a hack, it doesn't seem to be the right thing to do. Please correct me if I'm wrong! You should always implement timeout. Altough in your particular case, there may be a problem somewhere else. I suggest you use a sniffer to see why the connection doesn't establish with the webserver (The next state after httpDnsLookupDone is the connection). Using a sniffer (I suggest Ethereal, link from the links page at ICS website), you'll be able to see if the connection request packet is sent by your program and if the reply (positive or refused) come back from server. I guess the reply doesn't come back. Once we know that information, we'll be able to diagnose further. btw: You may also try to use the same URL and same server with the demo program HttpTst provided with ICS to see if it happends or not. If it doesn't happend with HttpTst demo, then it is likely there is something wrong with your code. If it happend with HttpTst, it is likely a problem of the webserver, of a security product (firewall, antivirus,...) or maybe you found a bug (Then trying with V6 beta could be useful since this version has the latest code available). 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 - Original Message - From: Cosmin Prund [EMAIL PROTECTED] To: twsocket@elists.org Sent: Friday, November 10, 2006 3:13 PM Subject: [twsocket] Help on ICS's HTTP client component Hello everyone. Note: This is a re-post of a message sent to the Talk list, with more detail on the problem. This message gets sent the second time to this list too. I sent the first one before receiving elist's subscription confirmation so I don't think it went through. I'm having some trouble using the THttpCli component from the ICS suite. I'm using this component to simply download a document off a web site (the document might be a configuration file or a compressed DLL file or whatever). It mostly works but some times it just stops (gets stuck in a state - the last OnChangeState message I'm getting is httpDnsLookupDone) and then nothing happens. My application's GUI doesn't get stuck because Application's message pump is working, but the download doesn't finish ether. Or, if something does happen, I know nothing about it... Please note I'm using GetAsync to get my document. Extra information: I'm using the version of ICS marked [ Download the latest ICS-V5 Distribution ] on http://www.overbyte.be/frame_index.html. Is V6 for general consumption? Should I try that? The web server I'm accessing is likely not the cause for this problem as the server is an Apache server running on a Windows machine on my LAN. I did implement a kind of time-out mechanism into my download thing: if no event is triggered for a given amount (no state change, no data received, no error) I consider the connection to be timed out. This gets my application back on the track working properly but this feels like a hack, it doesn't seem to be the right thing to do. Please correct me if I'm wrong! Thanks, Cosmin Prund -- 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] Receive() returns -1
Hello, Sorry mixed it up with with a 0 result 0 means a closed connection, -1 means an error, check LastError. Correct that it is an error, but no need to check LastError. TWSocket take care of the error if it happens here. Just Exit OnDataAvailable when Receive returns = 0. --- 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
Re: [twsocket] Receive() returns -1
Hello Jack, I have a TCP socket client. In some cases, OnDataReceived() gets fired for multiple times with ErrCode = 0 I never have seen a winsock error in OnDataAvailable. You can ignore the check in that event safely. Receive() the return value is always -1 so the application can not read any data back. Because OnDataReceived() keeps getting fired, this freezes the application. See my other reply. You have to check the return value and when it is = 0 then just exit OnDataAvailable. Nothing will freeze. --- 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
Re: [twsocket] Receive() returns -1
Wilfried Mestdagh wrote: Sorry mixed it up with with a 0 result 0 means a closed connection, -1 means an error, check LastError. Correct that it is an error, but no need to check LastError. TWSocket take care of the error if it happens here. Just Exit OnDataAvailable when Receive returns = 0. That's very true! Jack reported a freeze, so it might have been usefull to know the Winsock error number, eventhough not any error is a real error :-) --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- 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