Hello Dod,

I know the socket is closed because the TWSocket OnSessionClosed() event fires. 
 There are no proxies because the external device is on the Intranet (same 
router and network) as the PC.  It's a local peer connection.

Robert.

--- On Thu, 4/5/12, Dod <do...@yahoo.com> wrote:

> From: Dod <do...@yahoo.com>
> Subject: Re: [twsocket] TWSocket closing after every transaction with 
> external HTTP server
> To: "ICS support mailing" <twsocket@elists.org>
> Date: Thursday, April 5, 2012, 5:36 AM
> Hello,
> 
> How do you now socket has been closed ? have you done some
> tcpdump
> compare between wroking and non-working system ?
> 
> May be some users are going out thru a proxy that remove
> the
> keep-alive ?
> 
> regards.
> 
> r> Hello,
> 
> r> I have a Delphi 6 application that talks to an
> external device that acts as an HTTP server. I am using the
> ICS TWSocket components for this application. I open up a
> socket to talk to the device
> r> and handle the necessary header and body crafting to
> talk to the server. In other words, I am not using the ICS
> HTTP client component but using the lower level TWSocket
> component and handling the
> r> necessary HTTP "handshaking" myself.
> 
> r> The headers I craft and send to the external device
> have the keep-alive flag set to TRUE. On my system, after I
> send anything to the external device, the connection will
> stay open continuously and
> r> will not close until approximately 30 seconds of
> inactivity occurs (30 seconds where I don't make any
> requests of the external device as an HTTP server). I don't
> know if the external device closes
> r> it or if Microsoft Windows does it. But the important
> point is that normally I can do multiple sends and the
> connection will stay open until I send nothing for about 30
> seconds. This works fine
> r> and is what my code expects.
> 
> r> However, on some of my users systems the socket is
> closing after every send. I do have code that checks for a
> closed socket and attempts a reconnect to the external
> device if necessary, but does
> r> not expect to have to do a reconnect with each
> transaction.
> 
> r> My questions are:
> 
> r> Is there a system setting for sockets that might be
> causing this anomalous behavior on some users systems?
> 
> r> If so, are there Windows API function calls I can use
> to query the offending parameter and then set it to the
> expected close on 30 seconds of inactivity instead of with
> each transaction?
> 
> r> If so, can I, or how do I do it in a manner that will
> not adversely affect any other programs running on the users
> system?
> 
> r> Thanks,
> r> Robert
> r> --
> r> To unsubscribe or change your settings for TWSocket
> mailing list
> r> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> r> Visit our website at http://www.overbyte.be
> 
> --
> To unsubscribe or change your settings for TWSocket mailing
> list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to