0

According to Gsoap manual we intialize SOAP_IO_KEEPALIVE using

soap_init2(&soap, SOAP_IO_KEEPALIVE, SOAP_IO_KEEPALIVE);

But while closing socket

"A client should reset SOAP_IO_KEEPALIVE just before the last call to a server to close the connection after this last call. This will close the socket after the call and also informs the server to gracefully close the connection". Can anyone please explain me how to reset SOAP_IO_KEEPALIVE in client side?

  • Please specify your issue/requirement in the question by editing it, instead of adding a comment – mynawaz Oct 01 '15 at 08:11

1 Answers1

0

I don't actually turn it on in the init function because I use a config file to determine if it is on or off.

Here is an excerpt from some of my code:

    if(field == true)
    {
        soap_set_imode(soap,SOAP_IO_KEEPALIVE);
        soap_set_omode(soap,SOAP_IO_KEEPALIVE);
    }
    else
    {
        soap_clr_imode(soap,SOAP_IO_KEEPALIVE);
        soap_clr_omode(soap,SOAP_IO_KEEPALIVE);
    }
Jerry Jeremiah
  • 9,045
  • 2
  • 23
  • 32