CAPL Functions » TLS API » tlsClose
Function Syntax
Description
Closes the given TLS connection. This sends a TLS alert message to the peer node. The underlying socket will be closed automatically if the parameter closeUnderlyingSocket is set to a value greater than 0.Parameters
- socket: The socket handle.
- closeUnderlyingSocket:
- 0: do not close underlying socket.
- unequal 0: close the underlying socket.
Return Values
- 0: The function completed successfully.
- WSA_INVALID_PARAMETER (87): The specified socket was invalid.
- SOCKET_ERROR (-1): The function failed. Call IpGetLastSocketError to get a more specific error code. If the specific error code is 997, this just indicates an asynchronous operation is in progress.
- TLS_ERROR (-2): The function failed. Call tlsGetLastError to get a more specific error code. If the specific error code is 997, this just indicates an asynchronous operation is in progress.