CSocketWrench::DisableSecurity Method  
 
INT DisableSecurity();

The DisableSecurity method disables a secure session with the remote host.

Parameters

None.

Return Value

If the method succeeds, the return value is zero. If the method fails, the return value is INET_ERROR. To get extended error information, call GetLastError.

Remarks

The DisableSecurity method disables a secure session, with subsequent calls to Read and Write sending and receiving unencrypted data. It is important to note that because this method sends a shutdown message to terminate the secure session, this may cause connection to be closed by the remote host.

This method does not close the socket. Use the Disconnect method to close the socket and release the resources allocated for the current session.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header: Include cswsock10.h
Import Library: cswskv10.lib

See Also

CreateSecurityCredentials, DeleteSecurityCredentials, EnableSecurity