rem: shutdown((SOAP_SOCKET)soap->socket, 2); closesocket((SOAP_SOCKET)soap->socket);
add: soap->fshutdownsocket(soap, (SOAP_SOCKET)soap->socket, 2); soap->fclosesocket(soap, (SOAP_SOCKET)soap->socket);
context: tcp_disconnect(struct soap *soap){#ifdef WITH_OPENSSL  if (soap->ssl)  { int r, s = 0;    if (soap->session)      SSL_SESSION_free(soap->session);    if (*soap->host)    { soap->session = SSL_get1_session(soap->ssl);      if (soap->session)      { strcpy(soap->session_host, soap->host);        soap->session_port = soap->port;      }    }    r = SSL_shutdown(soap->ssl);    if (r != 1)    { s = ERR_get_error();      if (s)      { if (soap_valid_socket(soap->socket))        { shutdown((SOAP_SOCKET)soap->socket, 1);          soap->socket = SOAP_INVALID_SOCKET;        }        r = SSL_shutdown(soap->ssl);      }    }    DBGLOG(TEST, if (s) SOAP_MESSAGE(fdebug, "Shutdown failed: %d\n", SSL_get_error(soap->ssl, r)));    SSL_free(soap->ssl);    soap->ssl = NULL;    if (s)      return SOAP_SSL_ERROR;    ERR_remove_state(0);  }#endif  if (soap_valid_socket(soap->socket))  { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Closing socket %d\n", soap->socket));    shutdown((SOAP_SOCKET)soap->socket, 2);    closesocket((SOAP_SOCKET)soap->socket);    soap->socket = SOAP_INVALID_SOCKET;  }  return SOAP_OK;}