CInternetServer::DisableSecurity Method  
 
BOOL DisableSecurity(
  SOCKET hSocket  
);
BOOL DisableSecurity();

Disable secure communication with the client.

Parameters

hSocket
An optional parameter that specifies the handle to the client socket. If this parameter is omitted, the socket handle for the active client session will be used. If this method is called outside of a server event handler, the socket handle must be specified.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, the return value is zero. 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 client session.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cswsock11.h
Import Library: cswskv11.lib

See Also

EnableSecurity, SetCertificate