Re: How do you get ECONNRESET on recv?



Fish Maker <idea.vortex@xxxxxxxxx> wrote:
I have written a multi-threaded C client application running on HP
UX 11 Pa RISC that sends a SOAP request via send( ) to a webservice
residing on a Windows PC. The send( ) is always successful, and I
perform no other socket calls until I issue a recv( ) to get the
webservice response. Very occasionally the application either gets
no reponse or an ECONNRESET response. We suspect some sort of
network issue between the client and server. I have built and
deployed my client application for several other platforms including
Solaris and Windows and have never experienced this issue.

I feel that my application should handle this situation more
gracefully, and to this end my questions are:

Is it safe to assume anything regarding the state of the send( )
request on the webservice server? More specifically, what would be
the proper way for my client application to recover?

If you have received nothing but the ECONRESET on the recv() you can
assume nothing about the state of the request on the server. You do
not know if the server application received the data, nor if it acted
upon the data if it did receive it. To know that you need to receive
some sort of message from the server application.

I'm not fully up on all the terminology, but you may want to web
search on "two phase commit."

rick jones
--
web2.0 n, the dot.com reunion tour...
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
.



Relevant Pages